当一个类型为start-dfs.sh然后访问网站my_ip(上面只有10.0.0.151)时,我设置了一个带有两个节点hadoop01(master-10.0.0.151)和hadoop02(slave-10.0.0.152)的hadoop集群:50070.它很成功.
但是当我输入start-yarn.sh然后访问网站my_ip:8088.它失败了.
我的yarn-site.xml:
<configuration>
<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.resourcemanager.address</name>
<value>hadoop01:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>hadoop01:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>hadoop01:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>hadoop01:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>hadoop01:8088</value>
</property>
Run Code Online (Sandbox Code Playgroud)
核心-site.xml中:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop01:8020</value>
</property>
</configuration>
Run Code Online (Sandbox Code Playgroud)
与hadoop02相同的设置(奴隶)
我的hadoop01 hadoop-2.2.0/etc/hadoop/slaves设置
hadoop01
hadoop02
Run Code Online (Sandbox Code Playgroud)
键入start-dfs.sh&start-yarn.sh后输入jps
hadoop01:
21594 NameNode
22345 NodeManager
22007 SecondaryNameNode
22171 ResourceManager
23147 Jps
21762 DataNode
hadoop02:
29861 NodeManager
30358 Jps
29665 DataNode
Run Code Online (Sandbox Code Playgroud)
我的/ etc/hosts在hadoop01中:
localhost hadoop01
10.0.0.151 hadoop01
10.0.0.152 hadoop02
Run Code Online (Sandbox Code Playgroud)
我的/ etc/hosts在hadoop02中:
localhost hadoop02
10.0.0.151 hadoop01
10.0.0.152 …Run Code Online (Sandbox Code Playgroud) hadoop ×1