在执行
beeline -u jdbc:hive2://127.0.0.1:10000 -n root -p password -e "truncate table xxx;"
的时候报错:
Driver: Hive JDBC (version 2.1.1-cdh6.3.2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Exception while processing (state=08S01,code=1)
beeline -u jdbc:hive2://127.0.0.1:10000 -n root -p password -e "select * from xxx;"
初步怀疑是root用户的权限问题,遂
hive> show grant user root on database ods; OK Time taken: 0.04 seconds hive> show grant user hive on database ods; ERROR exec.DDLTask: org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException: Error showing privileges: User : root is not allowed check privileges of another user : hive. User has to belong to ADMIN role and have it as current role, for this action.
果然没有权限
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)