Did you run ‘add jar path_to_the-jar-including-your-udfclass’ first before
you issue ‘CREATE TEMPORARY FUNCTION’;
The actual mapper and reducer are run in the hadoop cluster, and hive’s “add
jar command” will distribute you jar file to the worker nodes using hadoop’s
distributed cache, so the mappers and reducers running in those machines can
find the class. 


On 09-7-16 下午7:10, "Saurabh Nanda" <[email protected]> wrote:

> I've added the JAR (containing my UDF class) in the session. I've issued the
> CREATE TEMPORARY FUNCTION command. However, all my map tasks fail with  a
> ClassNotFoundException when I try to run a query with the UDF:
> 
> select ct_ip_address(line) from raw limit 10;
> 
> (ct_ip_address is the UDF I have registered against my class)
> 
> What am I doing wrong? Does a class extending UDF need to be in a particular
> package? 
> 
> Saurabh.

Reply via email to