zoukankan      html  css  js  c++  java
  • Hadoop 历史服务配置启动查看

    历史服务配置启动查看

    1)配置mapred-site.xml

    <property>

    <name>mapreduce.jobhistory.address</name>

    <value>hadoop-001:10020</value>

    </property>

    <property>

        <name>mapreduce.jobhistory.webapp.address</name>

        <value>hadoop-001:19888</value>

    </property>

           2)查看启动历史服务器文件目录:

    [hadoop@hadoop-001 hadoop-2.7.2]# ls sbin/ |grep mr

    mr-jobhistory-daemon.sh

           3)启动历史服务器

    sbin/mr-jobhistory-daemon.sh start historyserver

           4)查看历史服务器是否启动

                  jps

           5)查看jobhistory

    http://hadoop-001:19888/jobhistory

    日志的聚集

    日志聚集概念:应用运行完成以后,将日志信息上传到HDFS系统上

           开启日志聚集功能步骤:

    (1)配置yarn-site.xml

    <!-- 日志聚集功能使能 -->

    <property>

    <name>yarn.log-aggregation-enable</name>

    <value>true</value>

    </property>

    <!-- 日志保留时间设置7天 -->

    <property>

    <name>yarn.log-aggregation.retain-seconds</name>

    <value>604800</value>

    </property>

    (2)关闭nodemanager 、resourcemanager和historymanager

    sbin/yarn-daemon.sh stop resourcemanager

    sbin/yarn-daemon.sh stop nodemanager

    sbin/mr-jobhistory-daemon.sh stop historyserver

    (3)启动nodemanager 、resourcemanager和historymanager

    sbin/yarn-daemon.sh start resourcemanager

    sbin/yarn-daemon.sh start nodemanager

    sbin/mr-jobhistory-daemon.sh start historyserver

                  (4)删除hdfs上已经存在的hdfs文件

    bin/hdfs dfs -rm -R /gec/mapreduce/wordcount/output

                  (5)执行wordcount程序

    hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar wordcount /gec/mapreduce/wordcount/input /gec/mapreduce/wordcount/output

                  (6)查看日志

    http://hadoop-001:19888/jobhistory

     

  • 相关阅读:
    is 和 == 区别@编码
    python字典
    python的简介
    初始python3
    初始python2
    初始python1
    Codeforces Round #596 (Div. 2, based on Technocup 2020 Elimination Round 2) B2. TV Subscriptions (Hard Version)
    Codeforces Round #596 (Div. 2, based on Technocup 2020 Elimination Round 2) A. Forgetting Things
    2019ICPC区域赛(银川)总结
    Educational Codeforces Round 74 (Rated for Div. 2) D. AB-string
  • 原文地址:https://www.cnblogs.com/Transkai/p/10440884.html
Copyright © 2011-2022 走看看