namenode不支持hadoop

lndjwyie  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(346)

我在ubuntu上使用hadoop。我已经在/usr/local目录中设置了hadoop目录(以及datanode和namenode目录)。每当我运行start-dfs.sh时,namenode就不会出现——屏幕输出中的消息会抱怨缺少bin/hdfs文件,即使该文件在那里(具有读/写访问权限)。我已经用hadoop环境变量安装了bashrc(复制如下)。有没有什么不对劲的想法?


# HADOOP VARIABLES START

export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export HADOOP_INSTALL=/usr/local/hadoop/hadoop-2.5.1
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 HADOOP_YARN_HOME=$HADOOP_INSTALL  ##added because I was not sure about the line below
export YARN_HOME=$HADOOP_INSTALL
export HADOOP_CONF_DIR=$HADOOP_INSTALL/etc/hadoop
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"

# HADOOP VARIABLES END
lo8azlld

lo8azlld1#

Try running namenode with the following (as opposed to using the start-dfs.sh) and see if that works.  

        hadoop-daemon.sh start namenode
        hadoop-daemon.sh start secondarynamenode
        hadoop-daemon.sh start datanode
        hadoop-daemon.sh start nodemanager
        mr-jobhistory-daemon.sh start historyserver

相关问题