gpt4 book ai didi

java - 使用默认示例在 mac osx 上运行 hadoop 的问题

转载 作者:可可西里 更新时间:2023-11-01 14:22:33 28 4
gpt4 key购买 nike

我使用以下命令安装了 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 install 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 是否正常工作?

最佳答案

确保在系统偏好设置下打开远程登录,然后打开文件共享:

enter image description here

为了检查它是否运行从命令行尝试 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

关于java - 使用默认示例在 mac osx 上运行 hadoop 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22848674/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com