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
  • 相关阅读:
    mybatis 中的稍微复杂些的sql语句
    Why doesn't Genymotion run on Windows 10?
    java.lang.NoSuchMethodError: 属于jar包冲突
    sqlserver修改某列为行号
    手机App开发
    java连接SQLserver
    svn忽略target
    JaxWsDynamicClientFactory弃用了,改成org.codehaus.xfire.client;
    FileDataSource java的文件操作
    解决Navicat无法连接Oracle的问题
  • 原文地址:https://www.cnblogs.com/onesea/p/13839963.html
Copyright © 2011-2022 走看看