我试着运行随机森林的例子。我运行的命令是
hadoop jar mahout-examples-0.9-job.jar org.apache.mahout.classifier.df.mapreduce.BuildForest -Dmapred.max.split.size=1874231 -d testdata/KDDTrain+.arff -ds testdata/KDDTrain.info -sl 5 -p -t 100 -o nsl-forest
我有个错误:
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected
at org.apache.mahout.classifier.df.mapreduce.partial.PartialBuilder.processOutput(PartialBuilder.java:113)
at org.apache.mahout.classifier.df.mapreduce.partial.PartialBuilder.parseOutput(PartialBuilder.java:89)
at org.apache.mahout.classifier.df.mapreduce.Builder.build(Builder.java:294)
at org.apache.mahout.classifier.df.mapreduce.BuildForest.buildForest(BuildForest.java:228)
at org.apache.mahout.classifier.df.mapreduce.BuildForest.run(BuildForest.java:188)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.mahout.classifier.df.mapreduce.BuildForest.main(BuildForest.java:252)
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.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
我使用mahout 0.9和hadoop2.6.0
我需要做什么来解决这个问题?
1条答案
按热度按时间qacovj5a1#
使用一些在hadoop-1上编译并与hadoop-2一起使用的jar时,通常会出现错误
我指的是一些网址请通过它们。
mahout 0.9和hadoop 2.2.0-找到了接口org.apache.hadoop.mapreduce.jobcontext,但需要类
Hadoop2.2.0与mahout 0.8兼容吗?
http://comments.gmane.org/gmane.comp.apache.mahout.user/20328