beeline执行insert命令时报错Permission denied: user=anonymous, access=EXECUTE, inode="/tmp/hadoop-yarn":xiao
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
[xiaoqiu@s150 /tmp/hadoop-yarn]$ hadoop fs -chmod -R 777 /tmp/hadoop-yarn
注意这里的-R为大写
如果是小写会报错
[xiaoqiu@s150 /tmp/hadoop-yarn]$ hadoop fs -chmod -r 777 /tmp/hadoop-yarn
chmod: `777': No such file or directory
欢迎关注我的公众号:小秋的博客
CSDN博客:https://blog.csdn.net/xiaoqiu_cr
github:https://github.com/crr121
联系邮箱:rongchen633@gmail.com
有什么问题可以给我留言噢~