<configuration>
<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>master</value>
</property>
<property>
<description>CLASSPATH for YARN applications. A comma-separated list of CLASSPATH entries</description>
<name>yarn.application.classpath</name>
<value>
hadoop_home/etc/hadoop,
hadoop_home/share/hadoop/common/*,
hadoop_home/share/hadoop/common/lib/*,
hadoop_home/share/hadoop/hdfs/*,
hadoop_home/share/hadoop/hdfs/lib/*,
hadoop_home/share/hadoop/mapreduce/*,
hadoop_home/share/hadoop/mapreduce/lib/*,
hadoop_home/share/hadoop/yarn/*,
hadoop_home/share/hadoop/yarn/lib/*
</value>
</property>
</configuration>
6.4 编辑 slaves file in hadoop_home/etc/hadoop ,使其具有以下内容
master
slave1
以上完成后,在master机器以hduser用户使用scp命令拷贝hadoop-2.2.0目录及内容到其他机器的同样路径:
scp hadoop folder 到各个机器 : scp /home/hduser/hadoop-2.2.0 slave1:/home/hduser/hadoop-2.2.0
7. 格式化hdfs (一般只进行一次,除非hdfs故障 ), 依次执行以下命令
cd /hduser/hadoop-2.2.0/bin/
./hdfs namenode -format
8 启动、停止hadoop集群(可多次进行, 一般启动后不停否则Application运行信息会丢失)
[hadoop@master bin]$ cd ../sbin/
[hadoop@master sbin]$ ./start-all.sh
9.验证:
hdfs WEB界面 : :50070
RM(ResourceManager)界面: :8088
相关阅读: