zoukankan      html  css  js  c++  java
  • yarn配置、启动、测试

     

    1: yarn共用hdfs的core-site.xml和hdfs-site.xml 。
    2 : yarn-site.xml 配置:

     <property>
            <name>yarn.resourcemanager.webapp.address</name>
            <value>bigdata0:8088</value>
        </property>
        <property>
            <name>yarn.resourcemanager.hostname</name>
            <value>bigdata0</value>
        </property>
        <property>
            <name>yarn.nodemanager.log-dirs</name>
            <value>/mnt/home/1141797198/yarn/0/logs,/mnt/home/1141797198/yarn/1/logs,/mnt/home/1141797198/home/yarn/2/logs</value>
        </property>
        <property>
            <name>yarn.nodemanager.local-dirs</name>
            <value>/mnt/home/1141797198/yarn/0/local,/mnt/home/1141797198/yarn/1/local,/mnt/home/1141797198/yarn/2/local</value>
        </property>
        <property>
            <name>yarn.nodemanager.aux-services</name>
            <value>mapreduce_shuffle</value>
        </property>
    • 1

    3:mapred-site.xml配置:

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
    <configuration>
        <property>
            <name>mapreduce.framework.name</name>
            <value>yarn</value>
        </property>
        <property>
            <name>mapreduce.jobhistory.address</name>
            <value>bigdata0:10020</value>
        </property>
        <property>
            <name>mapreduce.jobhistory.webapp.address</name>
            <value>bigdata0:19888</value>
        </property>
    </configuration>
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16

    4:启动:yarn resourcemanager
    5 : 创建目录:

            mkdir -p /mnt/home/1141797198/yarn/{0..2}/logs
            mkdir -p /mnt/home/1131797197/yarn/{0..2}/local
    • 1
    • 2

    6 : 启动nodemanager

        /mnt/home/1141797198/hadoop-current/bin/yarn nodemanager
    • 1

    7 : 测试 :hadoop jar hadoop-current/share/hadoop/mapreduce/hadoop -mapreduce-examples-2.7.6.jar pi 5 10
    8 :测试 hadoop jar share/hadoop/mapreduce/hadoop -mapreduce-examples-2.7.6.jar wordcount /user/hadoop/input /user/hadoop/output
    9:启动mapred historyserver:

    mapred historyserver
    • 1

    10 : 后台启动:

        /mnt/home/1141797198/hadoop-current/sbin/yarn-deamon.sh start resourcemanager
        /mnt/home/1141797198/hadoop-current/sbin/yarn-deamon.sh start nodemanager
        /mnt/home/1141797198/hadoop-current/sbin/mr-jobhistory-deamon.sh start historyserver
  • 相关阅读:
    【CF516D】Drazil and Morning Exercise(换根DP预处理+暴力双指针)
    【CF538G】Berserk Robot(思维)
    【CF521D】Shop(贪心)
    【洛谷4827】[国家集训队] Crash 的文明世界(斯特林数+换根DP)
    斯特林数的基础性质与斯特林反演的初步入门
    【CF566C】Logistical Questions(点分治)
    【CF980D】Perfect Groups(仔细一想是道水题)
    【洛谷2597】[ZJOI2012] 灾难(支配树)
    2020CCPC长春站题解A D F H J K
    2020CCPC长春站自我反省
  • 原文地址:https://www.cnblogs.com/onesea/p/13839963.html
Copyright © 2011-2022 走看看