[QUESTION] Throw exception when register Hive udf by 'add jar'
*For better global communication, please give priority to using English description, thx! *
Describe the question I have a hive environment that started Sentry, And I configure the following parameters:
- hadoop.security.authentication.startup.state=true
- java.security.krb5.conf.path=/etc/krb5.conf
- login.user.keytab.username=hive
- login.user.keytab.path=/opt/dolphinscheduler/conf/hive.keytab
Simple DML is can be executed successfully,but when I use udf(I've already created it),throw exception:
...
[INFO] 2020-02-21 19:15:34.508 - [taskAppId=TASK-22-81-105]:[235] - SQL title : hive-udf
[INFO] 2020-02-21 19:15:34.509 - [taskAppId=TASK-22-81-105]:[467] - after replace sql , preparing : select udfseq from agent_01
[INFO] 2020-02-21 19:15:34.509 - [taskAppId=TASK-22-81-105]:[472] - replaced sql , parameters:
[INFO] 2020-02-21 19:15:35.691 - [taskAppId=TASK-22-81-105]:[296] - hive create function sql: add jar hdfs://nameservice1/dolphinscheduler/root/udfs/udf-sequence-1.0-SNAPSHOT.jar
java.lang.RuntimeException: Insufficient privileges to execute add
at org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.executeFuncAndSql(SqlTask.java:356)
at org.apache.dolphinscheduler.server.worker.task.sql.SqlTask.handle(SqlTask.java:194)
at org.apache.dolphinscheduler.server.worker.runner.TaskScheduleThread.run(TaskScheduleThread.java:147)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Its say in https://docs.cloudera.com/documentation/enterprise/6/6.3/topics/cm_mc_hive_udf.html , the Direct JAR reference configuration is not support Sentry, now dolphinscheduler only support add jar to create temporary func.
And I through hive cli to execute add jar after kinit hive, its successfully:
hive> add jar hdfs://nameservice1/dolphinscheduler/root/udfs/udf-sequence-1.0-SNAPSHOT.jar;
converting to local hdfs://nameservice1/dolphinscheduler/root/udfs/udf-sequence-1.0-SNAPSHOT.jar
Added [/tmp/0b716804-f70f-40f3-a84f-458e64cd26e8_resources/udf-sequence-1.0-SNAPSHOT.jar] to class path
Added resources: [hdfs://nameservice1/dolphinscheduler/root/udfs/udf-sequence-1.0-SNAPSHOT.jar]
Now I'm confused, How to solve this problem?
Which version of DolphinScheduler: -[1.2.1-release]
who can look the problem?