This code accompanies this article which walks through creating UDFs in Apache Hive.
mvn compile
mvn test
mvn assembly:single
%> hive
hive> ADD JAR /path/to/assembled.jar;
hive> create temporary function hello as 'com.matthewrathbone.example.SimpleUDFExample';
hive> select hello(firstname) from people limit 10;