1-844-696-6465 (US)        +91 77600 44484        help@dezyre.com

Mapreduce job error



0

When i tried to execute the mapreduce example it showed me below exception .could you please  help me to come out of this?
Command used(as given in google drive document): hadoop jar usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples2.0.0-cdh4.4.0.jar
Exception;
Exception in thread "main" java.io.IOException: Error opening job jar: usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples2.0.0-cdh4.4.0.jar
    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.<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:133)

 

Thanks,

SreeSwetha.


2 Answer(s)


0

Hi Sreeswetha,

The hadoop is not able to open the jar file.

Caused by: java.util.zip.ZipException: error in opening zip file

Please open the jar in eclipse and rebuilt in again.

Hope this helps.

Thanks.


0

Hi Sreeswetha,

Use below command, you need to provide the class you want to run

hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples-2.0.0-cdh4.7.0.jar teragen 1000 /user/cloudera/teragen-dta

Here the first parameter is class - teragen

second parameter is no of 100 byte records need to generate - 1000

3rd parameter is path to generate data - user/cloudera/teragen-dta

hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples-2.0.0-cdh4.7.0.jar teragen 1000 /user/cloudera/teragen-dta
 

 

 

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password