我试图在配置单元中使用数据库,但是当我在HIVE中查询下面时:
CREATE DATABASE BIGDATA;我收到以下错误消息:
FAILED:元数据错误:MetaException(消息:出现异常:org.apache.hadoop.security.AccessControlException org.apache.hadoop.security.AccessControlException:权限被拒绝:user = aseema,access = WRITE ,inode =:hduser:supergroup:rwxr-xr-x) FAILED:执行错误,从org.apache.hadoop.hive.ql.exec.DDLTask返回代码1
导致这种情况的原因是什么? 这是因为在hdfs中缺少用户aseema的许可。请按照以下步骤操作。
以hduser身份登录并执行以下操作(从日志中看来,hduser是超级用户)
hadoop fs -mkdir -p / user / hive / warehouse hadoop fs -mkdir / tmp hadoop fs -chmod -R 777 / user / hive hadoop fs -chmod 777 / tmp之后,尝试执行create database语句来自aseema用户。
I am trying to database in hive, but when I run below query in HIVE:
CREATE DATABASE BIGDATA;I receive the following error message:
FAILED: Error in metadata: MetaException(message:Got exception: org.apache.hadoop.security.AccessControlException org.apache.hadoop.security.AccessControlException: Permission denied: user=aseema, access=WRITE, inode="":hduser:supergroup:rwxr-xr-x) FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
What is causing this?
解决方案This is because of the lack of permission to the user aseema in hdfs. Follow the steps below.
Login as hduser and perform the following operations (from the logs, it seems hduser is a superuser)
hadoop fs -mkdir -p /user/hive/warehouse hadoop fs -mkdir /tmp hadoop fs -chmod -R 777 /user/hive hadoop fs -chmod 777 /tmpAfter this, try executing the create database statement from aseema user.
更多推荐
在配置单元中创建数据库时,权限被拒绝错误
发布评论