1. Error Message

    Exception in thread "main" java.io.IOException: Mkdirs failed to create /var/folders/tf/6ffr7wkj0fz7qzw7yqyt568c0000gn/T/hadoop-unjar12941176920973881349/META-INF/license at org.apache.hadoop.util.RunJar.ensureDirectory(RunJar.java:229) at org.apache.hadoop.util.RunJar.unJar(RunJar.java:202) at org.apache.hadoop.util.RunJar.unJar(RunJar.java:101) at org.apache.hadoop.util.RunJar.run(RunJar.java:310) at org.apache.hadoop.util.RunJar.main(RunJar.java:236)

  2. Solution

    Just ran into this problem running mahout from CDH4 in standalone mode in my MacBook Air.

    The issue is that a /tmp/hadoop-xxx/xxx/LICENSE file and a /tmp/hadoop-xxx/xxx/license directory are being created on a case-insensitive file system when unjarring the mahout jobs.

    I was able to workaround this by deleting META-INF/LICENSE from the jar file like this:

    zip -d mahout-examples-0.6-cdh4.0.0-job.jar META-INF/LICENSE
    

    and then verified it with

    jar tvf mahout-examples-0.6-cdh4.0.0-job.jar | grep -i license
    

    Hope this helps!