如何使用mahout?

0kjbasz6  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(463)

我尝试使用以下链接与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. 错误的可能原因是什么?

w8ntj3qf

w8ntj3qf1#

您需要先设置apache hadoop(这里也有描述):

$ 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

设置环境变量:

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安装应该可以正常工作了(请阅读此处了解更多信息)。

相关问题