hadoop Jobhistory

Last updated on January 16, 2026 am

🧙 Questions

Hadoop开启Jobhistory服务,用于记录容器任务日志。

☄️Ideas

修改mapred-site.xml
vim /opt/hadoop/etc/hadoop/mapred-site.xml
<configuration>

    <!-- ispong :) ui访问地址,默认端口号19888 -->
    <property>
        <name>mapreduce.jobhistory.webapp.address</name>
        <value>isxcode:19888</value>
    </property>
    
    <!-- ispong :) 默认端口号10020-->
    <property>
        <name>mapreduce.jobhistory.address</name>
        <value>isxcode:10020</value>
    </property>
    
</configuration>
修改yarn-site.xml
vim /opt/hadoop/etc/hadoop/yarn-site.xml
<configuration>
	
    <!-- 开启日志聚合 -->
    <property>
	    <name>yarn.log-aggregation-enable</name>
	    <value>true</value>
    </property>

    <!-- 启动日志严控后,一定要配置url,否则ui无法查看日志 -->
    <property>
	    <name>yarn.log.server.url</name>
	    <value>http://isxcode:19888/jobhistory/logs</value>
    </property>

</configuration>
重启yarn服务
stop-yarn.sh && start-yarn.sh
启动history服务

关闭服务: mr-jobhistory-daemon.sh stop historyserver

mr-jobhistory-daemon.sh start historyserver

20221214143519


hadoop Jobhistory
https://ispong.isxcode.com/hadoop/hadoop/hadoop Jobhistory/
Author
ispong
Posted on
December 29, 2020
Licensed under