原因:
yarn.nodemanager.local-dirs和hadoop的hadoop.tmp.dir参数对应文件位置不一致
解决办法:
将hdfs-site.xml中hadoop.tmp.dir属性和yarn-site.xml中的yarn.nodemanager.local-dirs属性设置为相同路径
示例
hdfs-site.xml
<property>
<name>hadoop.tmp.dir</name>
<value>/home/suddev/dev/bd/app/tmp</value>
</property>
yarn-site.xml
<property>
<name>yarn.nodemanager.local-dirs</name>
<value>/home/suddev/dev/bd/app/tmp</value>
</property>
然后重启dfs和Yarn
./stop-dfs.sh
./stop-yarn.sh
./start-dfs.sh
./start-yarn.sh