在执行
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
Ti