beeline執行insert命令時報錯Permission denied: user=anonymous, access=EXECUTE, inode="/tmp/hadoop-yarn":xiao
阿新 • • 發佈:2019-02-17
0: jdbc:hive2://localhost:10000/cr> insert into student values(4,'sunny'); WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases. Error: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. Permission denied: user=anonymous, access=EXECUTE, inode="/tmp/hadoop-yarn":xiaoqiu:supergroup:drwx------ at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(FSPermissionChecker.java:266) at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:206) at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190) at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1752)
resolution:修改hdfs檔案系統的/tmp/hadoop-yarn的許可權為777
[[email protected] /tmp/hadoop-yarn]$ hadoop fs -chmod -R 777 /tmp/hadoop-yarn
注意這裡的-R為大寫
如果是小寫會報錯
[[email protected] /tmp/hadoop-yarn]$ hadoop fs -chmod -r 777 /tmp/hadoop-yarn
chmod: `777': No such file or directory