Created 12-11-2015 09:57 PM
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,VaibhaCreated 02-15-2016 06:35 PM
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.
Created 12-12-2015 02:42 AM
@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
Created 02-15-2016 06:33 PM
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.
Created 02-03-2016 03:45 PM
@vagrawal are you still having issues with this? Can you accept best answer or provide your own solution?
Created 02-15-2016 06:35 PM
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.