java.lang.noclassdeffounderror:org/apache/hadoop/mapreduce/lib/partition/inputsampler$采样器

dpiehjr4  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(359)

当我在hadoop中运行wordcount示例时,我得到了这个异常(但上次运行它时,它得到了正确的答案,没有得到任何异常):

hadoop jar /home/spark/opt/hadoop-2.6.5/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.5.jar wordcount /user/spark/hadoop/data /user/spark/hadoop/output

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:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.<init>(ProgramDriver.java:59)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)

我见过别人遇到这个问题,但没有得到任何答案。
http://mail-archives.apache.org/mod_mbox/hadoop-user/201406.mbox/%3ccabbdwwfwfqylfrvj8yvlakl_s7egrfjn1ykge28elziy2zygog@mail.gmail.com%3e
有人知道怎么修吗?

hvvq6cgz

hvvq6cgz1#

是我的错。我的同事改变了环境参数,忘了告诉我。它导致了noclassfound异常。

相关问题