栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

beeline报错:return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

beeline报错:return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

在执行

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.

果然没有权限

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/663176.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号