...
Creating Custom UDFs
First, you need to create a new class that extends UDF, with one or more methods named evaluate.
...
For a more involved example, see Hive-GenericUDAFCaseStudy this page.
Deploying jars for User Defined Functions and User Defined SerDes
...