错误信息:
Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
错误: 找不到或无法加载主类 org.apache.hadoop.mapreduce.v2.app.MRAppMaster
解决方法:
在主机中运行:hadoop classpath
记下返回的结果
vi $HADOOP_HOME/etc/hadoop/yarn-site.xml
添加一个配置
<property>
<name>yarn.application.classpath</name>
<value>hadoop classpath返回信息</value>
</property>
重启yarn