Hadoop 2.2.0 is compatible with Mahout 0.8?
Asked Answered
C

3

6

I have hadoop cluster version 2.2.0 running with mahout 0.8, is it compatible? Because whenever I run this command:

bin/mahout recommenditembased --input mydata.dat --usersFile user.dat --numRecommendations 2 --output output/ --similarityClassname SIMILARITY_PEARSON_CORRELATION

Give me this error:

Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected
at org.apache.mahout.common.HadoopUtil.getCustomJobName(HadoopUtil.java:174)
at org.apache.mahout.common.AbstractJob.prepareJob(AbstractJob.java:614)
at org.apache.mahout.cf.taste.hadoop.preparation.PreparePreferenceMatrixJob.run(PreparePreferenceMatrixJob.java:75)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.mahout.cf.taste.hadoop.item.RecommenderJob.run(RecommenderJob.java:158)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.mahout.cf.taste.hadoop.item.RecommenderJob.main(RecommenderJob.java:312)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:72)
at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:144)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:152)
at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

Or Im wrong? Any info would be helpful.

Calderon answered 3/1, 2014 at 20:5 Comment(1)
compiling 0.8 against 2.2 has problems the last time i tried. you should use 1.2.xReposition
B
3

No, it does not work with Hadoop 2.x, someone else got the same error message like you.

It seems that at the very least it would require a recompile.

And more people are having the same problems: how can I compile/using mahout for hadoop 2.0?

Baeda answered 3/1, 2014 at 20:17 Comment(1)
Good to know, Ive searched too on apache mail list, some people had this problem too.Calderon
H
3

About an hour ago Mahout has officially added support to Hadoop 2.x in the master branch (see MAHOUT-1329)

Checkout the code here https://github.com/apache/mahout and recompile using:

mvn clean package -Dhadoop2.version=2.2.0

Try and see if that works.

Howardhowarth answered 25/2, 2014 at 11:21 Comment(3)
It gives error Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.util.ProgramDriver.driver([Ljava/lang/String;)V at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:195) 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.main(RunJar.java:208)Sarong
@Sarong did u apply the patch for Mahout-1329 before trying to recompile? Better if you could try running with Mahout HEAD.Hoxha
I've just recompiled the code of trunk using maven goal.. how to apply patch ???Sarong
G
0

You can get the source code from github https://github.com/apache/mahout and run the following command

mvn -Dhadoop2.version=2.2.0 -DskipTests clean install

Then, you can find the release package in distribution/target/

Grosberg answered 11/8, 2014 at 12:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.