Issue running WordCount Jar



0
Hello, I am having an issue running the jar. Are we supposed to upload the jar to hadoop prior to running? I have it saved on /home/cloudera/ folder and I run this command: hadoop jar com.jackson.BDH.WordCount /home/cloudera/words.txt /Output/WordCount

When I run that, I get the following error:

Exception in thread "main" java.io.IOException: Error opening job jar: com.jackson.BDH.WordCount
at org.apache.hadoop.util.RunJar.main(RunJar.java:135)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:127)
at java.util.jar.JarFile.(JarFile.java:135)
at java.util.jar.JarFile.(JarFile.java:72)
at org.apache.hadoop.util.RunJar.main(RunJar.java:133)

Any suggestions would be great. Thanks.

2 Answer(s)


0

hi Rufus,

The jar is missing from the command, please add the jar name like below
hadoop jar om.jackson.BDH.WordCount /home/cloudera/words.txt /Output/WordCount

0

Hi Rufus,
Jar name itself is missing in your command. It shud be like below:

hadoop jar Sep28WordCount.jar com.prashanth.mr.usbatchsep28.WordCount /data/small/war_and_peace.txt /Output/28Sep/WordCount