gpt4 book ai didi

java - oozie 抛出错误 java.lang.InknownClassChangeError : Found interface org. apache.hadoop.mapreduce.Counter,但需要类

转载 作者:行者123 更新时间:2023-12-01 15:12:21 25 4
gpt4 key购买 nike

我编写了一个 MapReduce 类,在其中使用计数器,当我执行该 MapReduce 代码时出现此错误

java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.Counter, but class was expected
at MyProg.run(Unknown Source)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at MyProg.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:454)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:393)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:327)
at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
at org.apache.hadoop.mapred.Child.main(Child.java:264)

谁能告诉我为什么会出现此错误?

最佳答案

看起来 Oozie 和您拥有的 Hadoop 版本与 Oozie 构建所针对的版本之间存在版本冲突。看看这个(已解决的)hadoop 票证:https://issues.apache.org/jira/browse/MAPREDUCE-3697

该票证中有几个补丁,您可以尝试运行。

关于java - oozie 抛出错误 java.lang.InknownClassChangeError : Found interface org. apache.hadoop.mapreduce.Counter,但需要类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12159116/

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