When an external applications submits a MapReduce v1 job, it requires the hadoop 1 classpath. Likewise, MapReduce v2 applications require the hadoop 2.x or the yarn classpath, and other applications that can run on YARN require the yarn classpath.
The method to specify the classpath differs based on how the job or application is submitted:
|Method used to Submit the Job||Method to Specify Classpath|
|The external application uses the |
MapReduce programs submitted using the hadoop jar command use the classpath associated with the mode set by the MAPR_MAPREDUCE_MODE environment variable. If the MAPR_MAPREDUCE_MODE is not set, the classpath is set based on the default_mode specified in the hadoop_version file on the current node.
YARN applications (MapReduce or custom applications) that are submitted using the
If the external application has a service that submits the job, you can set the CLASSPATH environment variable to point to a different classpath prior to starting the service.
|The external application does not use the |
Set the classpath using one of the following options:
Use one of the following methods to get the classpath: