在TDH环境中,执行Hive分区操作时遇到'User hive is not a super user'的无权限异常。解决方案是调整Hadoop的user环境变量,确保HDFS文件归属于hive用户组。通过将分区文件指定到hive用户组后,再尝试添加分区,问题得以解决。
摘要由CSDN通过智能技术生成
TDH Hive 分区 抛出无权限异常
异常日志
SQL 错误 [20388] [42000]: COMPILE FAILED: Internal error HiveAccessControlException: [Error 20388] Permission denied: Principal [name=hive, type=USER] does not have following privileges for operation ALTERTABLE_ADDPARTS [[OBJECT OWNERSHIP] on Object [type=DFS_URI, name=xxxxxxxxxxxxxx]]
java.sql.SQLException: COMPILE FAILED: Internal error HiveAccessControlException: [Error 20388] Permission denied: Principal [name=hive, type=USER] does not have following privileges for operation ALTERTABLE_ADDPARTS [[OBJECT OWNERSHIP] on Object [type=DFS_URI, name=xxxxxxxxxx]]
COMPILE FAILED: Internal error HiveAccessControlException: [Error 20388] Permission denied: Principal [name=hive, type=USER] does not have following privileges for operation ALTERTABLE_ADDPARTS [[OBJECT OWNERSHIP] on Object [type=DFS_URI, name=/xxxxxxxxxxxxx]]