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/AtomLogs.zip tracecount

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

at org.apache.hadoop.util.RunJar.ensureDirectory(RunJar.java:128)

at org.apache.hadoop.util.RunJar.unJar(RunJar.java:104)

at org.apache.hadoop.util.RunJar.unJar(RunJar.java:81)

at org.apache.hadoop.util.RunJar.run(RunJar.java:209)

at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

Solutions can be found here:

http://stackoverflow.com/questions/10522835/hadoop-java-io-ioexception-mkdirs-failed-to-create-some-path

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