Wednesday, July 10, 2013

Use Custom UDFs with Hue

If you want to use custom UDFs with hue, here are the steps you need to follow:

1. Generate the UDF jar
2. Drop the jar in hadoop
hadoop dfs -copyFromLocal udf.jar /path/to/file/in/hdfs
3. In order for Hue to recognize the jar, you need to add the hive.aux.jars.path property to hive-site.xml file on the hue box
<property>
<name>hive.aux.jars.path</name
<value>hdfs:///path/to/file/in/hdfs</value>
</property>
4. Create the function definition using the Hue Query Editor (section on the left hand side to add jars/functions/etc)

2 comments:

  1. Nice post!

    There is a typo for #3, it should be 'hive.aux.jars.path' for the property name.

    Notice that you do no always need #3, for example for Python UDF, just doing #4 is enough

    ReplyDelete
  2. Thanks for the comment Romain. I've made the change.

    ReplyDelete