Hadoop:配置不正确

时间:2016-05-10 18:38:22

标签: macos hadoop osx-elcapitan

您好stackoverflow社区, 所以我一直想安装hadoop,但我遇到了问题。 我看过其他方法,但我仍然继续接受。我对hadoop完全不熟悉,所以我真的不知道该往哪里去。如果相关的话,我和El Capitan一起使用macbook pro。一旦我创建了sbin / start-dfs.sh,我收到了这个:

sbin/start-dfs.sh
16/05/10 11:09:37 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Incorrect configuration: namenode address dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.
Starting namenodes on []
Password:
localhost: /usr/local/Cellar/hadoop/2.7.2/libexec/sbin/hadoop-daemon.sh: line 69: [: MacBook: integer expression expected
localhost: starting namenode, logging to /usr/local/Cellar/hadoop/2.7.2/libexec/logs/hadoop-name-namenode-name’s
localhost: Error: Could not find or load main class MacBook

hadoop-daemon.sh是:

enter image description here

相关的XML如下:

芯-site.xml中

<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>

HDFS-site.xml中

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

如果有任何需要,我会免费提供。感谢您的帮助,我真的很感激,因为我真的想开始使用Hadoop。

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
export HADOOP_PREFIX=/usr/local/Cellar/hadoop

嘿所以这是一个更新,如果有人被考虑:我现在得到这个

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [myIP@]

新说明:我正在重做这个过程并重新阅读本指南。无论成功与否,我都会在这里发布我的更新:)!

zhongyaonan.com/hadoop-tutorial/…

1 个答案:

答案 0 :(得分:0)

看起来您的conf目录设置不正确请尝试以下步骤

export HADOOP_CONF_DIR = $HADOOP_HOME/etc/hadoop
hdfs namenode -format
hdfs getconf -namenodes
./start-dfs.sh