1.Hadoop已经安装完成并启动成功
复制mapred-site.xml.template重命名为mapred-site.xml
mv /usr/hadoop/hadoop-2.7.7/etc/hadoop/mapred-site.xml.template /usr/hadoop/hadoop-2.7.7/etc/hadoop/mapred-site.xml
vim /usr/hadoop/hadoop-2.7.7/etc/hadoop/mapred-site.xm
编辑mapred-site.xml
<!-- 通知框架MR使用YARN --> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property>
编辑yarn-site.xml
vim /usr/hadoop/hadoop-2.7.7/etc/hadoop/yarn-site.xml
<!-- reducer取数据的方式是mapreduce_shuffle --> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property>
YARN启动
/usr/hadoop/hadoop-2.7.7/sbin/start-yarn.sh
YARN停止
/usr/hadoop/hadoop-2.7.7/sbin/stop-yarn.sh
访问地址
http://ip地址:8088/cluster