我安装了hadoop使用:brew install hadoop。
我安装了以下版本:
hadoop version
Hadoop 2.3.0
Subversion http://svn.apache.org/repos/asf/hadoop/common -r 1567123
Compiled by jenkins on 2014-02-11T13:40Z
Compiled with protoc 2.5.0
From source with checksum dfe46336fbc6a044bc124392ec06b85
This command was run using /usr/local/Cellar/hadoop/2.3.0/libexec/share/hadoop/common/hadoop-common-2.3.0.jar
为什么启动单节点集群失败? brew安装hadoop安装32或64位版本的hadoop?我有一个64位系统...
./start-dfs.sh
14/04/03 13:29:43 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: ssh: connect to host localhost port 22: Connection refused
localhost: ssh: connect to host localhost port 22: Connection refused
Starting secondary namenodes [0.0.0.0]
0.0.0.0: ssh: connect to host 0.0.0.0 port 22: Connection refused
14/04/03 13:29:45 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
我的〜/ .profile看起来像:
#Hadoop variables
echo 'Set Hadoop Variables...'
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
export HADOOP_HOME=/usr/local/Cellar/hadoop/2.3.0
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
我可以运行哪个测试示例来验证hadoop是否正常工作?
答案 0 :(得分:3)
确保您在系统偏好设置下打开远程登录,然后文件共享:
为了检查它是否从命令行运行try jps
命令。你应该得到类似的东西:
43730 TaskTracker
43674 JobTracker
43730 NameNode
43582 DataNode
43611 SecondaryNameNode
43821 Jps
现在尝试一些hadoop示例:
$ hadoop jar /usr/local/Cellar/hadoop/2.3.0/libexec/hadoop-examples-*.jar pi 10 100