Connecting to ResourceManager at HadoopMaster/192.168.137.120:8032
Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=ROOT, access=WRITE, inode="/tmp/hadoop-yarn/staging/ROOT/.staging":root:supergroup:drwxr-xr-x
hadooop在运行jar包时遇到这样的问题,说明是权限的问题,需要hdfs的修改权限
需要修改hdfs-site.xml,此文件在hadoop下的etc/hadoop文件夹中
向hdfs-site.xml中添加一下内容:
<property>
<name>dfs.permissions</name>
<value>false</value>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,
but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode,
owner or group of files or directories.
</description>
</property>
添加完毕后需要将hdfs重启。
然后再次运行jar包就没问题了。