Running Hadoop Commands on a Mac and Windows Client

When you run hadoop commands on the Mac and Windows client, the location from which you run the command differs based on the command version that you require. For example, use the Hadoop 1 version of the hadoop jar command to run MapReduce v1 jobs and use the Hadoop 2 version to run MapReduce v2 applications.

To run the.. Run the command from this location:
Hadoop 1 version of the command

On Windows: %MAPR_HOME%\hadoop\hadoop-0.20.0\bin

On Mac: /opt/mapr/hadoop/hadoop-0.20.2/bin

Hadoop 2 version of the command

On Windows: %MAPR_HOME%\hadoop\hadoop-2.x.x\bin

On Mac: /opt/mapr/hadoop/hadoop-2.x.x/bin

On Linux installations, the installer creates symlinks to the hadoop directories by default. On Mac, you can create the symlinks. Once the symlinks are created, you can specify the version of the hadoop command as mentioned in the Hadoop command documentation.

WARNING:

Notes Specific to Windows

  • The user that runs hadoop commands from the hadoop 2 directory cannot have a space or a hyphen (-) in the username.
  • The native Hadoop library is not present on Windows. Therefore, the hadoop fs -getmerge command is not available.