. 日志聚集相关配置参数
日志聚集是YARN提供的日志中央化管理功能,它能将运行完成的Container/任务日志上传到HDFS上,从而减轻NodeManager负载,且提供一个中央化存储和分析机制。默认情况下,Container/任务日志存在在各个NodeManager上,如果启用日志聚集功能需要额外的配置。
(1) yarn.log-aggregation-enable
参数解释:是否启用日志聚集功能。
默认值:false
(2) yarn.log-aggregation.retain-seconds
参数解释:在HDFS上聚集的日志最多保存多长时间。
默认值:-1
(3) yarn.log-aggregation.retain-check-interval-seconds
参数解释:多长时间检查一次日志,并将满足条件的删除,如果是0或者负数,则为上一个值的1/10。
默认值:-1
(4) yarn.nodemanager.remote-app-log-dir
参数解释:当应用程序运行结束后,日志被转移到的HDFS目录(启用日志聚集功能时有效)。
默认值:/tmp/logs
(5) yarn.log-aggregation.retain-seconds
参数解释:远程日志目录子目录名称(启用日志聚集功能时有效)。
默认值:日志将被转移到目录
${yarn.nodemanager.remote-app-log-dir}/${user}/${thisParam}下
原文地址:http://blog.csdn.net/hxpjava1/article/details/19629133