【Hadoop】YARN 完全分布式配置

承接 https://www.cnblogs.com/jzsg/p/12622214.html

mv mapred-site.xml.template  mapred-site.xml

// 基于YARN的资源调度配置
vi etc/hadoop/mapred-site.xml:


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



vi etc/hadoop/yarn-site.xml:



<configuration>

    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>

    <property>
        <name>yarn.resourcemanager.resource-tracker.address</name>
        <value>172.16.152.130:8031</value>
    </property>
    <property>
            <name>yarn.resourcemanager.address</name>
            <value>172.16.152.130:8032</value>
    </property>
    <property>
            <name>yarn.resourcemanager.scheduler.address</name>
            <value>172.16.152.130:8034</value>
    </property>
    <property>
            <name>yarn.resourcemanager.webapp.address</name>
            <value>172.16.152.130:8088</value>
    </property>

    <property>
            <name>yarn.log-aggregation-enable</name>
            <value>true</value>
    </property>
    <property>
          <name>yarn.log.server.url</name>
          <value>http://master:19888/jobhistory/logs/</value>
    </property>
</configuration>

  


修改后拷贝至从节点(slave)
scp -r yarn-site.xml root@slave:/usr/local/software/hadoop-2.5.1/etc/hadoop/


$ sbin/start-yarn.sh

$ sbin/stop-yarn.sh


在master上jsp 发现 20906 ResourceManager,从节点发现20808 NodeManager 即成功,web 访问YARN :http://master:8088/cluster

posted @ 2020-04-03 11:54  加州风尘  阅读(375)  评论(0编辑  收藏  举报