hadoop配置Mapreduce job日志

1.你需在 mapred-site.xml 中对其进行配置,并分发到整个集群

<property>
<name>mapreduce.jobhistory.address</name>
<value>0.0.0.0:10020</value>
</property>

<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>0.0.0.0:19888</value>
</property>

2.此时重启集群,查看Mapreduce任务日志会报如下错误
点击 http://master2:19888/jobhistory/logs/slave21:40269/container_1457140309286_0001_01_000001/job_1457140309286_0001/hadoop2出现Aggregation is not enabled. Try the nodemanager at slave22:42812 错误。

解决办法:

<property>  
    <name>yarn.log-aggregation-enable</name>  
    <value>true</value>  
</property>  

in yarn-site.xml to enable log aggregation.

3.再次重启集群,并启动jobhistory服务。

mr-jobhistory-daemon.sh start historyserver

你可能感兴趣的:(mapreduce,hadoop,集群)