我只是通过运行wordcount示例来测试hadoop,但是出现了这个错误:
14/07/30 12:03:02 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your
platform... using builtin-java classes where applicable
14/07/30 12:03:03 INFO client.RMProxy: Connecting to ResourceManager at /127.0.0.1:8032
14/07/30 12:03:04 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8032. Already
tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1
SECONDS)
14/07/30 12:03:05 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8032. Already
tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1
SECONDS)
互联网上有些人因为yarn-site.xml文件而提出建议。我的是:
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>128</value>
<description>Minimum limit of memory to allocate to each container request at the Resource
Manager.</description>
</property>
<property>
<name>yarn.scheduler.maximum-allocation-mb</name>
<value>1024</value>
<description>Maximum limit of memory to allocate to each container request at the Resource
Manager.</description>
</property>
<property>
<name>yarn.scheduler.minimum-allocation-vcores</name>
<value>1</value>
<description>The minimum allocation for every container request at the RM, in terms of
virtual CPU cores. Requests lower than this won't take effect, and the specified value will
get allocated the minimum.</description>
</property>
<property>
<name>yarn.scheduler.maximum-allocation-vcores</name>
<value>2</value>
<description>The maximum allocation for every container request at the RM, in terms of
virtual CPU cores. Requests higher than this won't take effect, and will get capped to this
value.</description>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>2048</value>
<description>Physical memory, in MB, to be made available to running containers</description>
</property>
<property>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>2</value>
<description>Number of CPU cores that can be allocated for containers.</description>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
我上周开始运行程序并且工作正常,所以我真的无法弄清楚发生了什么。感谢帮助。
答案 0 :(得分:0)
我将在this thread上给出相同的答案。
确保您已开始使用纱线。使用此命令启动它:
start-yarn.sh
然后使用此命令验证资源管理器是否正在运行:
JPS
输出应该如下所示:
17542 NameNode
17920 SecondaryNameNode
22064 Jps
17703 DataNode
18226 ResourceManager
18363 NodeManager