Tag Archives: Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster

Website content quality is poor, distribution efficiency is too low how to do?Huawei engineers offer 5 unique skills>>>

I built a pseudo distributed big data environment. When I ran the example in Hadoop package, I got the following error:

Error: unable to find or load the main class org.apache.hadoop.mapreduce.v2.app.mrappmaster

Reason:

The above error is prompted when the build action is running on Hadoop cluster. The reason is that the yarn.application.classpath in yarn-site.xml and mapred-site.xml are not configured

Solution:

Find yarn-site.xml and mapred-site.xml, and add the following code in the configuration tag:

1 <property>
2     <name>yarn.application.classpath</name>
3     <value>
4        /bigdata/hadoop-3.0.3/etc/hadoop:/bigdata/hadoop-3.0.3/share/hadoop/common/lib/*:/bigdata/hadoop-3.0.3/share/hadoop/common/*:/bigdata/hadoop-3.0.3/share/hadoop/hdfs:/bigdata/hadoop-3.0.3/share/hadoop/hdfs/lib/*:/bigdata/hadoop-3.0.3/share/hadoop/hdfs/*:/bigdata/hadoop-3.0.3/share/hadoop/yarn/lib/*:/bigdata/hadoop-3.0.3/share/hadoop/yarn/*:/bigdata/hadoop-3.0.3/share/hadoop/mapreduce/lib/*:/bigdata/hadoop-3.0.3/share/hadoop/mapreduce/*:/bigdata/hadoop-3.0.3/contrib/capacity-scheduler/*.jar
5     </value>
6 </property>

Note: my $Hadoop_ HOME=bigdata/hadoop-3.0.3

After modification, remember to format