Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hue + UDF access issue

avatar
Contributor

I am facing a peculiar issue with an UDF in Hue. My team has a UDF which has 2 functions : encrypt and decrypt which they register in hive as p.aes_encrypt and p.aes_decrypt. All users can access both the functions using Hive CLI but the non-root users (except hadoop group) cannot use the p.aes_decrypt function via Hue (gives NoClassDefFoundError) but can use the p.aes_encrypt function (from the same jar).

I have already tried with re-registering the function and the decrypt function still doesn't work via Hue.(while the same works on CLI). If I register the function with a different function name, it works. I have also checked the classpath and the corresponding jar is present. The permissions on the jar and the jar path are also correct. Please provide any insights so as to why can't a user use the p.aes_decrypt function while he can use the p.aes_encrypt function and both are from same jar. Thanks,Vaibha
1 ACCEPTED SOLUTION

avatar
Contributor

I still couldn't find out why the error occured, but I re-registered the jar with from a different location in the HDFS (double checking the same permissions for the new path as the previous one) and it worked.

View solution in original post

4 REPLIES 4

avatar

@vagrawal - Are you running HiveCLI on the same server that has Hue Server running? That could be the issue. Depending on how the UDF jar is added it may not be accessible to all the Hive clients.

You could place the jar in HDFS and then register the UDF. This may be helpful too - https://community.hortonworks.com/questions/2390/methods-to-add-jars-to-hive.html

avatar
Contributor

Hi,

The Hive CLI and Hue Server were not running on the same machine. Also, the jar was seen and accessed properly as we could access all the methods except the p.aes_decrypt.

avatar
Master Mentor

@vagrawal are you still having issues with this? Can you accept best answer or provide your own solution?

avatar
Contributor

I still couldn't find out why the error occured, but I re-registered the jar with from a different location in the HDFS (double checking the same permissions for the new path as the previous one) and it worked.