为什么自制hadoop2.3不能运行osx小牛?

fhg3lkii  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(241)

在使用自制软件安装hadoop之后,我遇到了以下问题。我跟随导游来到这里:
http://glebche.appspot.com/static/hadoop-ecosystem/hadoop-hive-tutorial.html
在bashrc中设置以下环境变量:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
export HADOOP_INSTALL=/usr/local/Cellar/hadoop/2.3.0
export HADOOP_HOME=$HADOOP_INSTALL
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

在运行hadoop namenode-format。。我尝试运行start-dfs.sh并获得以下结果:

14/05/05 21:19:27 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: set hadoop variables
localhost: starting namenode, logging to /usr/local/Cellar/hadoop/2.3.0/libexec/logs/mynotebook.local.out
localhost: Error: Could not find or load main class org.apache.hadoop.hdfs.server.namenode.NameNode
localhost: set hadoop variables
localhost: starting datanode, logging to /usr/local/Cellar/hadoop/2.3.0/libexec/logs/mynotebook.local.out
localhost: Error: Could not find or load main class org.apache.hadoop.hdfs.server.datanode.DataNode
Starting secondary namenodes [0.0.0.0]
0.0.0.0: set hadoop variables
0.0.0.0: secondarynamenode running as process 12747. Stop it first.
14/05/05 21:19:37 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

我该如何避开这个问题?

4si2a6ki

4si2a6ki1#

根据第二条信息的第一行, "14/05/05 21:19:27 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable" 我想您正在64位操作系统中运行hadoop。hadoop是在32位系统中默认构建的,我有同样的问题和相同的消息。你要做的是在你的系统上从源代码重新构建hadoop。
我建议你使用下面的指南,它是为2.2版本,但它的2.3版本也可以
http://csrdu.org/nauman/2014/01/23/geting-started-with-hadoop-2-2-0-building/
或官方指南
http://hadoop.apache.org/docs/r2.3.0/hadoop-project-dist/hadoop-common/nativelibraries.html#build

相关问题