如何与Mahout合作?

时间:2014-07-17 09:42:55

标签: apache hadoop cloud mahout recommendation-engine

我尝试使用链接使用mahout: http://girlincomputerscience.blogspot.in/2010/11/apache-mahout.html

当我执行命令

anand@ubuntu:~/Downloads/mahout-distribution-0.9$ bin/mahout recommenditembased --input mydata.dat --usersFile user.dat --numRecommendations 2 --output output/ --similarityClassname SIMILARITY_PEARSON_CORRELATION

它显示:

hadoop binary is not in PATH,HADOOP_HOME/bin,HADOOP_PREFIX/bin, running locally Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

可能出现错误的原因是什么?

1 个答案:

答案 0 :(得分:0)

您需要先设置Apache Hadoop(也称为here):

$ http://mirror.metrocast.net/apache/hadoop/common/hadoop-1.2.1/hadoop-1.2.1-bin.tar.gz
$ tar zxf hadoop-1.2.1-bin.tar.gz
$ cd hadoop-1.2.1
$ export PATH=`pwd`/bin:$PATH

然后尝试设置Apache Mahout

Apache Mahout设置

$ wget -c http://archive.apache.org/dist/mahout/0.9/mahout-distribution-0.9.tar.gz
$ tar zxf mahout-distribution-0.9.tar.gz
$ cd mahout-distribution-0.9

设置env变量:

export HADOOP_HOME=/path/to/hadoop-1.2.1
export PATH=$HADOOP_HOME/bin:$PATH
export MAHOUT_HOME=/path/to/mahout-distribution-0.9
export PATH=$MAHOUT_HOME/bin:$PATH

现在你的Mahout安装工作正常(请阅读here了解更多信息)。