You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Tianyin Xu <ti...@cs.ucsd.edu> on 2014/06/19 08:00:35 UTC

Failed to run hadoop-mapreduce-examples-2.3.0.jar

Hi,

I build Hadoop-2.3.0 from the source based on the Wiki page,
http://wiki.apache.org/hadoop/HowToSetupYourDevelopmentEnvironment

I have YARN running on top of HDFS,

#hdfs namenode -format
#hdfs namenode
#hdfs datanode

#yarn resourcemanager
#yarn nodemanager

Everything runs smoothly. As the last step, I follow the Wiki to run the
wordcount (I didn't use ant because the hadoop-mapreduce-examples-2.3.0.jar
is already built)

#hadoop jar
hadoop-mapreduce-project/build/hadoop-mapreduce-examples-2.3.0.jar
wordcount -Dmapreduce.job.user.name=$USER in out

I get the following errors,

java.lang.NoClassDefFoundError:
org/apache/hadoop/mapreduce/lib/partition/InputSampler$Sampler
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at
org.apache.hadoop.util.ProgramDriver$ProgramDescription.<init>(ProgramDriver.java:60)
at org.apache.hadoop.util.ProgramDriver.addClass(ProgramDriver.java:103)
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

I guess there must be some JAR not included in CLASSPATH. I searched the
codebase and found InputSampler.java was inside
hadoop-mapreduce-client-core-2.3.0.jar. However, even I manually added this
JAR in the CLASSPATH, I still got the error.

Could anyone shed some lights on this?

Thank you very much!
Tianyin