Executing commands in Map Reduce Commands in Module3


3 Answer(s)


hi Anand,

hadoop-example.jar is a file that ships along with hadoop . In cloudera its located under "/usr/lib/hadoop-0.20-mapreduce".

The sample-1.0.jar s available in the zip file "module3-Eclipse Project for Assignments.zip". Once extracted navigate to "module3-dz\target". You can use this to execute the samples provided in module 3.

Thanks

Thank you for responding to my question.

the hadoop-example.jar is not working.
Please find the error below.

[cloudera@localhost ~]$ hadoop jar hadoop-examples.jar teragen 1000 /user/cloudera/output/teragen/out4
Exception in thread "main" java.io.IOException: Error opening job jar: hadoop-examples.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.(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)

Please advise what I am missing here.

Hello,

When I am running hadoop jar sample-1.0.jar com.module3.wordcount /output Iam getting the following error please advise what I am missing.

[cloudera@localhost samples]$ hadoop jar sample-1.0.jar com.module3.wordcount /user/cloudera/wordcount/input/wordcount/output01
Exception in thread "main" java.lang.ClassNotFoundException: com.module3.wordcount
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:201)