在hadoop上运行mahout的fpg算法作为集群模型

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

我在linux(centos)上安装mahout-0.7和hadoop-1.2.1,hadoop配置为多节点。我创建了一个名为hadoop的用户,并在path/home/hadoop/opt/i set mahou\u home和hadoop\u home以及mahout\u local中安装mahout和hadoop。。。。在用户环境hadoop中的.bashrc文件中


# .bashrc

# Source global definitions

if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71/jre
export HADOOP_HOME=/home/hadoop/opt/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
export HADOOP_CONF_DIR=/opt/hadoop/conf
export MAHOUT_HOME=/home/hadoop/opt/mahout
export MAHOUT_CONF_DIR=$MAHOUT_HOME/conf
export PATH=$PATH:$MAHOUT_HOME/bin

I want to run mahout on hadoop systemfile ,When I run the following command, I get an error

命令:hadoop@master mahout$bin/mahout-fpg-i/home/hadoop/output.dat-o模式-method mapreduce-k50-s2
错误:

MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
 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
 Error: Could not create the Java Virtual Machine.
 Error: A fatal exception has occurred. Program will exit.

请帮帮我。我试过了,但没能纠正这个错误。

jhdbpxl9

jhdbpxl91#

您的配置和使用中似乎存在一些冲突。在First look中,您可以确保:要确保正确设置了mahout路径,请使用以下命令:

echo $MAHOUT_LOCAL

这也不应该返回空字符串(在本地运行mahout时) HADOOP_CONF_DIR 应设置为 $HADOOP_HOME/conf 以下是hadoop常用的环境变量列表:


# HADOOP VARIABLES START

export JAVA_HOME=/path/to/jdk1.8.0/  #your jdk path
export HADOOP_HOME=/usr/local/hadoop #your hadoop path
export HADOOP_INSTALL=/usr/local/hadoop #your hadoop path
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"
export HADOOP_CLASSPATH=/home/hduser/lib/* #thir party libraries to be loaded with Hadoop

# HADOOP VARIABLES END

此外,您还得到了一个堆错误,您应该增加堆大小,以便jvm能够初始化
此外,您还可以通过添加有关群集的更多信息来帮助解决错误:
你用多少台机器?
这些机器的硬件规格是什么?
hadoop的发行版和版本是什么?

相关问题