一个java项目使用jdbc连接池连接hiveserver2 创建临时函数,第一次执行成功,第二次执行失败,返回错误如下:
ERROR org.apache.hadoop.hive.ql.Driver: [HiveServer2-Handler-Pool: Thread-82]: FAILED: SemanticException No valid privileges
User dm_ds does not have privileges for CREATEFUNCTION
The required privileges: Server=server1->URI=file:///tmp/023d5b17-76ff-48c4-b15b-6d9aca656892_resources/hive-udf-1.1.0.jar->action=*;
org.apache.hadoop.hive.ql.parse.SemanticException: No valid privileges
User dm_ds does not have privileges for CREATEFUNCTION
The required privileges: Server=server1->URI=file:///tmp/023d5b17-76ff-48c4-b15b-6d9aca656892_resources/hive-udf-1.1.0.jar->action=*;
at org.apache.sentry.binding.hive.HiveAuthzBindingHook.postAnalyze(HiveAuthzBindingHook.java:573)
报的是本地/tmp目录下的包sentry没有授权,创建临时函数的语句:create temporary function decrypty as 'com.lkl.data.scrt.DeCryptyUDF' using jar 'hdfs: