Managing the MapReduce Mode

The MapReduce mode determines whether a MapReduce program runs as a job in classic mode (JobTracker and TaskTracker) or as an application in yarn mode (ResourceManager, NodeManager, and MapReduce ApplicationMaster).

By default, client and cluster nodes submit MapReduce programs to the YARN framework unless you configure them to use the classic framework. Therefore, if you only plan to run YARN applications such as MapReduce v2 and other applications that run on YARN, no change is required.

To customize the MapReduce mode, you can set the MapReduce mode on the cluster, client, with an environment variable, and at the command line. However, the priority of the setting determines which mode is used:



The following table list the components for which you can configure the MapReduce mode and the priority of the configuration:

Component Mode Priority
Command Line The mode set when you submit a job at the command line overrides the environment variable, client node, and cluster setting. .
Environment Variable

In general, the mode set in an environment variable overrides the client node and cluster setting for all commands on that shell.

Client The default mode set on the client node overrides the cluster setting.
Cluster The default mode for jobs and applications that are submitted on cluster nodes.

On Windows and Mac clients, the behavior is different. For details, see Setting Up the Client.

Note:

If an external application submits a MapReduce program without using the command line, the classpath that is set for the external application defines how the program runs in the cluster. For more information, see Configuring the Classpath for External Applications.

The following sections provide more informatin about how to manage the MapReduce mode: