To run a HIVE UDF in the sentry enabled system, you need to keep the jar at the hive aux path as well as HDFS location.
you need to follow the below steps:-
- Set the Hive Aux Path.
- Restart Hive Server2.
- Keep jar file at HIVE Aux Path and HDFS location and grant ALL on jar file using Sentry.
- Need to register the UDF by creating temporary/permanent functions.
- Temporary Function: Create temporary function as ‘com..‘
- Permanent Function: Create function as ‘com..‘
- Run the UDF function command e.g. select (Column_Name) from limit 10;
