|
|
-
problem while running wordcount on lion x
Jignesh Patel 2011-10-06, 00:13
On Oct 5, 2011, at 8:10 PM, Jignesh Patel wrote:
> While running Wordcount from eclipse on Lion X after setting up everything I got following error. > > Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: hdfs://localhost:9000/user/hadoop-user/input > > I have used following command > > bin/hadoop fs -mkdir /user/hadoop-user > > and it has created directory for me. > > when I checked I found following > > Jignesh-MacBookPro:hadoop hadoop-user$ bin/hadoop fs -ls / > 2011-10-05 20:05:03.073 java[45432:1903] Unable to load realm info from SCDynamicStore > Found 2 items > drwxr-xr-x - hadoop-user supergroup 0 2011-10-05 19:52 /user > drwxr-xr-x - hadoop-user supergroup 0 2011-10-05 00:59 /users > > > I am wondering where did following directory created as I am unable to locate it because my base directory is users not user > /user/hadoop-user 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.
-
Re: problem while running wordcount on lion x
Brock Noland 2011-10-06, 00:16
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
-
Re: problem while running wordcount on lion x
Jignesh Patel 2011-10-06, 00:31
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) I tried following java -jar xf wordcountsmp/wordcount.jar
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
-
Re: problem while running wordcount on lion x
Brock Noland 2011-10-06, 00:35
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 > >
-
Re: problem while running wordcount on lion x
Jignesh Patel 2011-10-06, 02:22
Thanks for this information. The jar problem is resolved now.
Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: hdfs://localhost:9000/user/hadoop-user/input
I know I don't have input directory but before that I need to find out where this user/hadoop-user got created and I am not able to find it. My root is /Users/Hadoop-User.
-Jignesh
On Oct 5, 2011, at 8:35 PM, Brock Noland wrote:
> 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 >> >>
-
Re: problem while running wordcount on lion x
Jignesh Patel 2011-10-06, 14:20
At last I am able to execute the code through eclipse. and out put is as follows:
bin/hadoop dfs -cat /user/hadoop-user/output/part-r-00000
2011-10-06 10:14:46.036 java[48060:1903] Unable to load realm info from SCDynamicStore Do 1 I 2 as 2 do. 1 not 1 say, 1
But I am still wondering where this /user/hadoop-user/output/ file located in my local mac system. I am not able to find it.
And another observation " Unable to load realm info from SCDynamicStore". I see some messages where they say this is a non-harm message for only Lion X system On Oct 5, 2011, at 10:22 PM, Jignesh Patel wrote:
> Thanks for this information. The jar problem is resolved now. > > Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: hdfs://localhost:9000/user/hadoop-user/input > > I know I don't have input directory but before that I need to find out where this user/hadoop-user got created and I am not able to find it. > My root is /Users/Hadoop-User. > > -Jignesh > > On Oct 5, 2011, at 8:35 PM, Brock Noland wrote: > >> 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 >>> >>> >
|
|