Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in running Hadoop example on single node cluster

I'm running the word count example provided by hadoop. The following is the error that i am getting:

-bash-4.1$ ./hadoop jar /home/chanders/Hadoop/bin/hadoop-examples-0.20.203.0.jar wordcount /usr/temp_hadoop /usr/output
Warning: Maximum heap size rounded up to 1024 MB
Warning: Maximum heap size rounded up to 1024 MB
Exception in thread "main" java.io.IOException: Error opening job jar: /home/chanders/Hadoop/bin/hadoop-examples-0.20.203.0.jar
    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:129)
    at java.util.jar.JarFile.<init>(JarFile.java:141)
    at java.util.jar.JarFile.<init>(JarFile.java:78)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:88)
-bash-4.1$ ^C
-bash-4.1$ ./hadoop jar /home/chanders/Hadoop/bin/hadoop*examples*.jar wordcount /usr/temp_hadoop /usr/output
Warning: Maximum heap size rounded up to 1024 MB
Warning: Maximum heap size rounded up to 1024 MB
Exception in thread "main" java.io.IOException: Error opening job jar: /home/chanders/Hadoop/bin/hadoop*examples*.jar
    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:129)
    at java.util.jar.JarFile.<init>(JarFile.java:141)
    at java.util.jar.JarFile.<init>(JarFile.java:78)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:88)

Information about my installation: I followed the installation instructions from Michaeal Noll's link Here The only change is that i havent created a separate hadoop user. I'm using it under my login.

like image 586
Chander Shivdasani Avatar asked Dec 27 '22 16:12

Chander Shivdasani


2 Answers

There was a mistake in the path for the jar. I corrected it.

like image 93
Chander Shivdasani Avatar answered Jan 05 '23 17:01

Chander Shivdasani


One common mistake (seen it on other forums) is due to permissions issues on the folder where hadoop is trying to run the jar file. Fixing this enables hadoop to find the jar file.

like image 45
Alberto Avatar answered Jan 05 '23 17:01

Alberto