在纱线配置中,我们有以下参数(根据https://hadoop.apache.org/docs/r2.7.6/hadoop-yarn/hadoop-yarn-common/yarn-default.xml(
yarn.resourcemanager.webapp.address ${yarn.resourcemanager.hostname}:8088 The http address of the RM web application.
yarn.resourcemanager.webapp.https.address ${yarn.resourcemanager.hostname}:8090 The https adddress of the RM web application.
yarn.resourcemanager.resource-tracker.address ${yarn.resourcemanager.hostname}:8031
我们不确定如何设置hostname
例如
我们可以设置参数:
yarn.resourcemanager.webapp.address
作为
master01.formula45.com:8088 ( when master01.formula45.com is the hostname of the machine that resource manager is installed)
或者可能比更好
0.0.0.0:8088
参考:
https://superuser.com/questions/949428/whats-the-difference-between-127-0-0-1-and-0-0-0-0https://serverfault.com/questions/78048/whats-the-difference-between-ip-address-0-0-0-0-and-127-0-0-1
在yarn site.xml中设置以下属性:
<property>
<name>yarn.resourcemanager.hostname</name>
<value>yourhostname</value>
</property>
您的主机名(yourhostname
(必须在/etc/hosts
文件中设置为有效的IP,或者是DNS的有效主机。