You can set the MapReduce mode with an environment variable on a client or cluster node. The MapReduce mode set in the environment variable overrides the default_mode set on the client node and the cluster.
Using this method, you can open multiple terminals and set each shell to use a different mode. Therefore, you can run both MapReduce v1 and MapReduce v2 jobs from the same client machine at the same time.
For information on how to set the environment variable for an ecosystem service, see Managing the MapReduce Mode for Ecosystem Components.
To set the MapReduce mode with an Environment Variable:
- Open terminal on the client node.
- Enter one of the following commands on the shell:
- export MAPR_MAPREDUCE_MODE=yarn
- export MAPR_MAPREDUCE_MODE=classic
Setting the MapReduce mode on the shell configures all
hadoop commands that are run on this shell to operate using the hadoop version associated with the mode that you selected. For example, if you set the MapReduce mode to yarn, when you run hadoop classpath the classpath associated with hadoop 2.x displays.