Mahout: build 0.9 support hadoop2.3.0

mvn  clean package -Dhadoop2.version=2.3.0 -DskipTests
mvn  clean package -Dhadoop.version=2.3.0 -DskipTests
mvn clean package -Dhadoop.profile=200  -DskipTests


The above commands will not work. Actually, you should download patch and patch mahout0.9 to support hadoop2 using the below build command

mvn clean install -Dhadoop2 -Dhadoop2.version=2.3.0 -DskipTests=true

So, I change to use current trunk codes (1.0-snapshot)

#svn co http://svn.apache.org/repos/asf/mahout/trunk mahtout1.0

#mvn clean install -Dhadoop2 -Dhadoop2.version=2.3.0 -DskipTests=true

Run example in mahout

1. start hadoop cluster

2.# mahout recommenditembased --input mahout/item.txt --output mahout/ --booleanData true -s SIMILARITY_COOCCURRENCE

 CLASS=org.apache.mahout.driver.MahoutDriver

    for f in $MAHOUT_HOME/examples/target/mahout-examples-*-job.jar $MAHOUT_HOME/mahout-examples-*-job.jar ; do
      if [ -e "$f" ]; then
        MAHOUT_JOB=$f
      fi
    done

But a error occures



 

rowsimilarityjob doesn't clean it's temp dir, and fails when seeing it again

 https://issues.apache.org/jira/browse/MAHOUT-834

When during the media time, i delete temp/weights in hdfs maually. and the job works well. The input is likes
1,2
1,3
1,5
2,1
2,2
2,4
3,3
3,4
4,5
4,2
 The output likes:
1	[4:2.0,1:1.0]
2	[5:2.0,3:2.0]
3	[2:2.0,5:1.0,1:1.0]
4	[3:2.0,1:1.0,4:1.0]
 

 -------------------------

#mahout  command could run examples in mahout. The default props files in /path/to/mahout1.0/src/conf/

the entrence of mahout command is org.apache.mahout.driver.MahoutDriver

#mahout recommenditembased --input mahout/item.txt --output mahout/ --booleanData true -s SIMILARITY_COOCCURRENCE

will invoke class org.apache.mahout.cf.taste.hadoop.item.RecommenderJob which in now in mahout-mrlegacy dir

which is located in mahout/src/conf/driver.classes.default.props

org.apache.mahout.cf.taste.hadoop.item.RecommenderJob = recommenditembased

References

https://issues.apache.org/jira/browse/MAHOUT-1329

猜你喜欢

转载自ylzhj02.iteye.com/blog/2059893