Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop >> mail # user >> problem while running wordcount on lion x


+
Jignesh Patel 2011-10-06, 00:13
+
Brock Noland 2011-10-06, 00:16
+
Jignesh Patel 2011-10-06, 00:31
Copy link to this message
-
Re: problem while running wordcount on lion x
Hi,

Answers, inline.

On Wed, Oct 5, 2011 at 7:31 PM, Jignesh Patel <[EMAIL PROTECTED]> wrote:

>  have used eclipse to export the file and then got following error
>
> hadoop-user$ bin/hadoop jar
> wordcountsmp/wordcount.jarorg.apache.hadoop.examples.WordCount input output
>
>
> Exception in thread "main" java.io.IOException: Error opening job jar:
> wordcountsmp/wordcount.jarorg.apache.hadoop.examples.WordCount
>        at org.apache.hadoop.util.RunJar.main(RunJar.java:90)
> Caused by: java.util.zip.ZipException: error in opening zip file
>        at java.util.zip.ZipFile.open(Native Method)
>        at java.util.zip.ZipFile.<init>(ZipFile.java:127)
>        at java.util.jar.JarFile.<init>(JarFile.java:135)
>        at java.util.jar.JarFile.<init>(JarFile.java:72)
>        at org.apache.hadoop.util.RunJar.main(RunJar.java:88)
>
>
OK, the problem above is that you are missing a space, it should be:

hadoop-user$ bin/hadoop jar wordcountsmp/wordcount.jar
org.apache.hadoop.examples.WordCount input output

with a space between the jar and the class name.
> I tried following
> java -jar xf wordcountsmp/wordcount.jar
>

That's not how you extract a jar. It should be:

jar tf wordcountsmp/wordcount.jar

to get a listing of the jar and:

jar xf wordcountsmp/wordcount.jar

To extract it.
> and got the error
>
> Unable to access jar file xf
>
> my jar file size is 5kb. I am feeling somehow eclipse export in macOS is
> not creating appropriate jar.
>
>
>
>
> On Oct 5, 2011, at 8:16 PM, Brock Noland wrote:
>
> > Hi,
> >
> > On Wed, Oct 5, 2011 at 7:13 PM, Jignesh Patel <[EMAIL PROTECTED]>
> wrote:
> >>
> >>
> >> I also found another problem if I directly export from eclipse as a jar
> >> file then while trying javac -jar or hadoop -jar doesn't recognize that
> jar.
> >> However same jar works well with windows.
> >
> >
> >
> > Can you please share the error message? Note, the structure of the hadoop
> > command is:
> >
> > hadoop jar file.jar class.name
> >
> > Note, no - in front of jar like `java -jar'
> >
> > Brock
>
>
+
Jignesh Patel 2011-10-06, 02:22
+
Jignesh Patel 2011-10-06, 14:20
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB