问题描述
我有一个jar,其中一个MapReduce类工作正常,而具有相同结构的另一个类 - 正确使用Tool,使用getConf()等 - 失败,出现错误'找到接口org.apache.hadoop.mapreduce。 jobcontext但是班级预期'。我应该寻找哪些具体的地方来解决这个问题?
只要有任何帮助/线索就会很棒!
编辑:其他有同样问题的人(没有回答还没有在线程上):
我不得不分拆repo,进行一些修改(移植项目以使依赖管理更好,并根据HIPI正在使用的外部jar版本更改几个类),并使用Hadoop-2 jar重新编译。 找到的接口...类预期
'是使用Hadoop-1上编译的一些jar并且正在与Hadoop-2一起使用的典型代码。
希望这有助于某人。
I have a jar in which one MapReduce class works fine while the other class with same structure - proper use of Tool, use of getConf(), etc. - fails with error 'Found interface org.apache.hadoop.mapreduce.jobcontext but class expected'.Any specific places that I should look for to fix this?Just about any help/clue would be great!
Edit: Other people with the same issue (no answer as yet on that thread either): https://groups.google.com/forum/#!msg/hipi-users/LSvktkk1YdI/yssjjc7cjeIJ
I had to fork the repo, make a few changes (ported the project to maven to make dependency management better and changed a few classes in accordance with the external jar versions that HIPI was using) and recompile it with Hadoop-2 jars.The 'Found interface ... class expected
' error is typical of using some jars that are compiled on Hadoop-1 and are being used with Hadoop-2.
Hope this helps someone.
这篇关于找到接口org.apache.hadoop.mapreduce.jobcontext,但是当其他类工作正常时,一个类的类预期错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!