配置
- 修改 mapred-site.xml
<property>
<name>mapreduce.jobhistory.address</name>
<value>slave1:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>slave1:19888</value>
</property>
- 修改yarn-site.xml
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>259200</value>
</property>
<property>
<name>yarn.log.server.url</name>
<value>http://slave1:19888/jobhistory/logs</value>
</property>
-
重启 yarn
-
启动 jobhistory server
(配置在哪台,就在哪台机器启动)
[root@slave1 sbin]# ./mr-jobhistory-daemon.sh start historyserver
- 停止 jobhistory server
[root@slave1 sbin]# ./mr-jobhistory-daemon.sh stop historyserver
参考资料
【0】Hadoop - failed redirect for container
https://issues.apache.org/jira/browse/YARN-4037