CentOS搭建MapReduce环境

MapReduce环境搭建

  • 前言
    • 1、修改yarn-site.xml文件
    • 2、修改mapred-site.xml
    • 2.启动


前言

上一篇配置的hadoop单机环境,这篇依靠hadoop搭建MapReduce环境,如无hadoop环境请参考上篇文章搭建https://blog.csdn.net/weixin_49995598/article/details/114263408?spm=1001.2014.3001.5501


1、修改yarn-site.xml文件

<configuration>
        <property>
                <name>yarn.nodemanager.aux-services</name>
                <value>mapreduce_shuffle</value>
                
        </property>
        <property>
                <name>yarn.resourcemanager.hostname</name>
                <value>BaiBH</value>
        </property>
</configuration>

yarn.resourcemanager.hostname 主机名称:The hostname of the RM.

yarn.nodemanager.aux-services 服务名称可多个,但格式有要求:A comma separated list of services where service name should only contain a-zA-Z0-9_ and can not start with numbers

2、修改mapred-site.xml

<configuration>
        <property>
                <name>mapreduce.framework.name</name>
                <value>yarn</value>
        </property>`
</configuration>

The runtime framework for executing MapReduce jobs. Can be one of local, classic or yarn.
如无此文件,可将mapred-site.xml.template修改为mapred-site.xml

2.启动

start-yarn.sh

查看是否启动成功
[root@BaiBH hadoop-2.6.0]# jps

5701 NameNode
6005 SecondaryNameNode
10295 ResourceManager
10439 Jps
10398 NodeManager
5807 DataNode

NodeManager、ResourceManager两个为MapReduce运行组件

你可能感兴趣的:(环境搭建,hadoop,hdfs,mapreduce)