Ambaris-Hive创建自定义函数报错
[toc]
# 环境
Ambari 2.7.5
# 报错内容
> hive
0: jdbc:hive2://bigdata-24-194:2181,bigdata-2> create function OneID as 'com.udf.OneIDUDF' using jar 'hdfs:/hive/udf/oneid-udf-1.0-SNAPSHOT.jar';
Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: Principal [name=hdfs, type=USER] does not have following privileges for operation CREATEFUNCTION [ADMIN PRIVILEGE on INPUT, ADMIN PRIVILEGE on OUTPUT] (state=42000,code=40000)
1
2
3
4
2
3
4
# 原因
hive Authorization默认启用了
# 解决方法
关闭Hive配置Enable Authorization
修改为
重启服务
上次更新: 2023/03/10, 20:58:04