hive建立分割槽表報錯AccessControlException Permission denied: user=NONE, access=WRITE, inode

張俊傑121發表於2020-09-23

錯誤提示資訊

[2020-09-23 18:07:58] )
sql> create table order_partition
     (
         order_no   string,
         order_time string
     )
         PARTITIONED BY (event_time string)
         row format delimited fields terminated by '\t'
[2020-09-23 18:10:34] [08S01][1] Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: org.apache.hadoop.security
.AccessControlException Permission denied: user=NONE, access=WRITE, inode="/user/hive/warehouse/order_partition":root:supergroup:drwxr-xr-x

錯誤場景

hive建立分割槽表

錯誤原因猜測

可能是我hive賬號是 NONE, 沒有這個許可權,

解決辦法

新增hdfs-site.xml 裡面配置
/root/soft/hadoop-2.7.2/etc/hadoop/hdfs-site.xml

 <property>
      <name>dfs.permissions</name>
      <value>false</value>
</property>

重啟Hadoop

去hadoop-2.7.2/sbin目錄下面
重啟NameNode和 DataNode


[root@zjj101 sbin]#  hadoop-daemon.sh stop namenode
stopping namenode
[root@zjj101 sbin]#  hadoop-daemon.sh start namenode
starting namenode, logging to /root/soft/hadoop-2.7.2/logs/hadoop-root-namenode-zjj101.out
[root@zjj101 sbin]#  hadoop-daemon.sh stop datanode
stopping datanode
[root@zjj101 sbin]#   hadoop-daemon.sh start datanode
starting datanode, logging to /root/soft/hadoop-2.7.2/logs/hadoop-root-datanode-zjj101.out
[root@zjj101 sbin]# 









相關文章