Another MapReduce issue with MacOs

I faced another macos issue w/ MapReduce on MacOs:


$HADOOP_HOME/bin/hadoop jar target/hadoop-tutorial-1.0-SNAPSHOT-jar-with-dependencies.jar fr.finaxys.tutorials.hadoop.TraceCount -archives /user/pierre/ tracecount

Exception in thread « main » Mkdirs failed to create /var/folders/5w/rckc21hd0kz2qg0_3r7g60b00000gn/T/hadoop-unjar3988465705021626998/META-INF/license

at org.apache.hadoop.util.RunJar.ensureDirectory(

at org.apache.hadoop.util.RunJar.unJar(

at org.apache.hadoop.util.RunJar.unJar(


at org.apache.hadoop.util.RunJar.main(

Solutions can be found here:

It is a case sensitive issue with MacOs.

For now, I wasn’t able to make the trick with maven working so I’m removing the LICENCE file manually from the archive:

zip -d target/hadoop-tutorial-1.0-SNAPSHOT-jar-with-dependencies.jar META-INF/LICENSE


YARN Test on MacosX


I’m currently playing a little with hdfs and yarn (Hadoop 2.7.1) on my laptop (Darwin Kernel Version 14.5.0 / OS X Yosemite Version 10.10.5) . Until then, I was mainly doing HBase development and I thought it could be nice if I learn some basic stuff such as Map Reduce programming before starting with Spark.

While I was trying the Map Reduce tutorial, I fall on this error:

15/08/17 22:59:29 INFO mapreduce.Job: Job job_1439843536878_0001 failed with state FAILED due to: Application application_1439843536878_0001 failed 2 times due to AM Container for appattempt_1439843536878_0001_000002 exited with  exitCode: 127

For more detailed output, check application tracking page:http://MacBook-Pro-de-Pierre.local:8088/cluster/app/application_1439843536878_0001Then, click on links to logs of each attempt.

Diagnostics: Exception from container-launch.

Container id: container_1439843536878_0001_02_000001

Exit code: 127

Stack trace: ExitCodeException exitCode=127:

at org.apache.hadoop.util.Shell.runCommand(


at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(

at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(




at java.util.concurrent.ThreadPoolExecutor.runWorker(

at java.util.concurrent.ThreadPoolExecutor$


Container exited with a non-zero exit code 127

Failing this attempt. Failing the application.

15/08/17 22:59:29 INFO mapreduce.Job: Counters: 0

This simple command fix the issue:

sudo ln -s /usr/bin/java /bin/java

Hope this helps.