Exception in thread "main" java.io.IOException: Mkdirs failed to create /var/folders/pj/v9dbtvnd0sj0

889 views
Skip to first unread message

S Roy

unread,
Feb 24, 2016, 5:14:08 PM2/24/16
to CDK Development
I am new to kite-dataset.
I am following the O'Reilly Video Tutorial on "Analytics Data Storage in Hadoop"
I downloaded the kite-dataset on my mac and trying to run

iMac:ml-20m Roy$ ../kite-dataset csv-schema movies.csv --record-name Movie

Exception in thread "main" java.io.IOException: Mkdirs failed to create /var/folders/pj/v9dbtvnd0sj0vgcl7ywmz6lw0000gn/T/hadoop-unjar5951277535632166920/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)


I am running Java 8


iMac:ml-20m Roy$ java -version

java version "1.8.0_74"

Java(TM) SE Runtime Environment (build 1.8.0_74-b02)

Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

iMac:ml-20m Roy$ 


iMac:ml-20m Roy$ $HADOOP_HOME/bin/hadoop version

Hadoop 2.6.4

Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r 5082c73637530b0b7e115f9625ed7fac69f937e6

Compiled by jenkins on 2016-02-12T09:45Z

Compiled with protoc 2.5.0

From source with checksum 8dee2286ecdbbbc930a6c87b65cbc010

This command was run using /Users/Roy/hadoop/hadoop-2.6.4/share/hadoop/common/hadoop-common-2.6.4.jar

iMac:ml-20m Roy$ 


Any pointers on why creation of the directory is failing?


Thanks,

Roy



Alexandre Rafalovitch

unread,
Feb 24, 2016, 6:27:02 PM2/24/16
to CDK Development
Try creating it manually with the same user you are running now. My
guess is that you don't have permission to that directory (e..g
root-owned or wrong group). A Unix level issue.

Regards,
Alex.
----
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/
> --
> You received this message because you are subscribed to the Google Groups
> "CDK Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cdk-dev+u...@cloudera.org.
> For more options, visit https://groups.google.com/a/cloudera.org/d/optout.

Roy

unread,
Feb 24, 2016, 6:31:31 PM2/24/16
to Alexandre Rafalovitch, CDK Development
Hi Alex,
I tried that. I was able to create a directory.
I even gave the parent directory T permission 777. Still no luck.
I feel that the unjar process is having issue on mac. No idea how to resolve it.



iMac:ml-20m Roy$ ls -l /var/folders/pj/v9dbtvnd0sj0vgcl7ywmz6lw0000gn/

total 0

drwxr-xr-x    8 Roy  staff   272 Feb 24 15:06 0

drwx------  252 Roy  staff  8568 Jan 31 06:01 C

drwxr-xr-x    2 Roy  staff    68 Nov  4 22:20 Cleanup At Startup

drwxrwxrwx  101 Roy  staff  3434 Feb 24 15:30 T

iMac:ml-20m Roy$ ../kite-dataset csv-schema movies.csv --record-name Movie

Exception in thread "main" java.io.IOException: Mkdirs failed to create /var/folders/pj/v9dbtvnd0sj0vgcl7ywmz6lw0000gn/T/hadoop-unjar5975632704770484053/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)

iMac:ml-20m Roy$ 

Vig

unread,
Jan 19, 2017, 6:54:41 PM1/19/17
to CDK Development, araf...@gmail.com
Hi,

Were you able to find a solution for this issue?
I am also facing the same issue.

Shankar Roy

unread,
Jan 19, 2017, 8:10:10 PM1/19/17
to Vig, CDK Development, araf...@gmail.com
Nope.

Thanks,
Shankar

Gabriel Reid

unread,
Jan 20, 2017, 2:26:38 AM1/20/17
to CDK Development
Issues like this are typically due to having a file and a directory
with the same name but different case packaged in a jar file, and
attempting to un-jar them on a case-insenstive file system.

So in the CDK jar there is probably a file named /META-INF/LICENSE,
and a directory named /META-INF/license. It appears that you're
running on Mac OS X, which by default has a case-insensitive file
system, and thus sees the LICENSE file and license directory simply as
a file and a directory that have the same name, which causes the
unpacking of the jar file to fail.

If you want to just run through the tutorial, probably the easiest way
to get around this is to simply use a Linux virtual machine (via
Virtual Box / Vagrant / Docker / something else) and run the tutorial
on Linux. However, I would also suggest reporting this issue in the
Kite jira (https://issues.cloudera.org/projects/KITE/) so that the
building process of the jar files can get fixed to work on OS X.

- Gabriel
Reply all
Reply to author
Forward
0 new messages