Found interface org.apache.hadoop.mapreduce.jobcontext but class expected error for one class when other class works fine

本小妞迷上赌 提交于 2019-12-13 04:15:02

问题


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


回答1:


you might have conflicting versions of a required jar files. Resolve the conflict and check.

You can also try updating the required jar file with newer version.

by resolve I mean keep only one of them




回答2:


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.



来源:https://stackoverflow.com/questions/25594447/found-interface-org-apache-hadoop-mapreduce-jobcontext-but-class-expected-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!