最近在学习Hadoop的时候, 用虚拟机在Ubuntu中按照官网教程搭建好伪集群环境。 hdfs可以正常启动, 但是在启动Yarn的时候, NodeManager一直无法启动, 查看了下yarn的ResourceManager日志, 发现一直在报错:
org.apache.hadoop.yarn.server.resourcemanager.ResourceTrackerService:
NodeManager from john-VirtualBox doesn't satisfy minimum allocations,
Sending SHUTDOWN signal to the NodeManager.
上网查了很多资料, 下面这些方法都试过,
1. yarn.scheduler.maximum-allocation-mb调大
2. yarn.nodemanager.resource.memory-mb调大
3. 等等。。。
然而,并没有什么卵用。。。
后来忘记在哪看了一个博客说好像是hadoop-2.7.4版本默认参数有点问题,我按照他的方法把下面这两个参数添加到yarn-site.xml中,发现竟然神奇的解决了。。
<property>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>8</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>8192</value>
</property>
此问题真正的原因,我还不清楚, 知道的麻烦留言告诉下哈~