yarn 日志聚合
2021-09-03 本文已影响0人
后知不觉1
日志聚合参数
参数:yarn.nodemanager.log-dirs
参数解释:container本地日志存放地址(可配置多个目录)。
默认值:${yarn.log.dir}/userlogs
参数:yarn.log-aggregation-enable
参数解释:是否启用日志聚集功能。
默认值:false
参数:yarn.log-aggregation.retain-seconds
参数解释:在HDFS上聚集的日志最多保存多长时间。
默认值:-1 (永久) 单位s
参数:yarn.log-aggregation.retain-check-interval-seconds
参数解释:多长时间检查一次日志,并将满足条件的删除,如果是0或者负数,则为上一个值的1/10。
默认值:-1
参数:yarn.nodemanager.remote-app-log-dir
参数解释:当应用程序运行结束后,日志被转移到的HDFS目录(启用日志聚集功能时有效)。
默认值:/tmp/logs
参数:yarn.nodemanager.remote-app-log-dir-suffix
参数解释:远程日志目录子目录名称(启用日志聚集功能时有效)。
默认值:logs 日志将被转移到目录${yarn.nodemanager.remote-app-log-dir}/${user}/${thisParam}下
参数:yarn.nodemanager.log.retain-seconds
参数解释:NodeManager上日志最多存放时间(不启用日志聚集功能时有效)。
默认值:10800(3小时)
日志聚合功能依赖说明

日志聚合依赖 hdfs、nodemanager日志采集进程,日志采集进程直接在nodemanager进程中无需手动操作
备注
:日志聚合功能排查看appmaster进程的nodemanager日志,hdfs目录权限