hadoop之yarn部署

yarn伪分布式部署:

官网要求:
YARN on Single Node
You can run a MapReduce job on YARN in a pseudo-distributed mode by setting a few parameters and running ResourceManager daemon and NodeManager daemon in addition.
The following instructions assume that 1. ~ 4. steps of the above instructions are already executed.
1、Configure parameters as follows:
etc/hadoop/mapred-site.xml:
在这里插入图片描述
etc/hadoop/yarn-site.xml:
在这里插入图片描述
2、Start ResourceManager daemon and NodeManager daemon:
$ sbin/start-yarn.sh
2、Browse the web interface for the ResourceManager; by default it is available at:
ResourceManager - http://localhost:8088/
4、Run a MapReduce job.
5、When you’re done, stop the daemons with:
$ sbin/stop-yarn.sh

1、复制一份新的mapred-site.xml模板文件,并重命名为mapred-site.xml
因为原本在hadoop这个文件夹里面是mapred-site.xml.template这个文件而没有mapred-site.xml文件,所以需要重命名
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ cd etc/hadoop
[hadoop@hadoop001 hadoop]$ cp mapred-site.xml.template mapred-site.xml

2、修改 mapred-site.xml文件内容:
替换成以下内容:
在这里插入图片描述

3、修改yarn-site.xml文件:
[hadoop@hadoop001 hadoop]$ vi yarn-site.xml
替换成以下内容:
在这里插入图片描述

4、启动ResourceManager进程和NodeManager进程
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ sbin/start-yarn.sh
[hadoop@hadoop001 hadoop-2.6.0-cdh5.7.0]$ jps
在这里插入图片描述
出现了ResourceManager进程和NodeManager进程,启动成功

5、进入web界面:
http://47.75.240.243:8088/
在这里插入图片描述
部署成功!!!
部署成功!!!mapreduce是没有进程的,计算是以yarn为载体即可,计算时直接提交到yarn上的

-------------------------------------------------------------未完待续--------------------------------------------

猜你喜欢

转载自blog.csdn.net/Sylvia_D507/article/details/82944137