Oozie job failed with "Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster"
search cancel

Oozie job failed with "Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster"

book

Article ID: 294713

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

Symptoms:

The Oozie LauncherMapper failed with the following error message:

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

Environment


Cause

This error message indicates that the Yarn classpath does not include the jars containing the required MRAppMaster class on the Oozie server and client.

Resolution

You will need to setup the Yarn application client libraries with updated yarn-site.xml containing correct yarn.application.classpath. Once you have ensured that Yarn client and yarn-site.xml is setup correctly, restart the Oozie server so that it can pick up the changes.

Note: This is not a problem with Oozie, but Oozie fails due to incorrect configuration.


Example:

<property>
 <name>yarn.application.classpath</name>
 <value>$HADOOP_CONF_DIR,$HADOOP_COMMON_HOME/*,$HADOOP_COMMON_HOME/lib/*,$HADOOP_HDFS_HOME/*,$HADOOP_HDFS_HOME/lib/*,$HADOOP_MAPRED_HOME/*,$HADOOP_MAPRED_HOME/lib/*,$HADOOP_YARN_HOME/*,$HADOOP_YARN_HOME/lib/*,$USS_HOME/*,$USS_CONF</value>
</property>

where all the above variables are setup correctly using the corresponding <daemon>-config.sh scripts. Ex: hdfs-config.sh