gpt4 book ai didi

hadoop - java.lang.NoClassDefFoundError:org/apache/hadoop/mapreduce/lib/partition/InputSampler $ Sampler

转载 作者:行者123 更新时间:2023-12-02 20:37:12 26 4
gpt4 key购买 nike

当我在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

有人知道如何解决吗?

最佳答案

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

关于hadoop - java.lang.NoClassDefFoundError:org/apache/hadoop/mapreduce/lib/partition/InputSampler $ Sampler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50754837/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com