YARN-2255. YARN Audit logging not added to log4j.properties. Contributed by Aihua Xu.
(cherry picked from commit f8c14326ee
)
This commit is contained in:
parent
dae22c962d
commit
1978317068
|
@ -235,6 +235,36 @@ log4j.appender.RMSUMMARY.MaxBackupIndex=20
|
|||
log4j.appender.RMSUMMARY.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.RMSUMMARY.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
|
||||
|
||||
#
|
||||
# YARN ResourceManager audit logging
|
||||
#
|
||||
rm.audit.logger=INFO,NullAppender
|
||||
rm.audit.log.maxfilesize=256MB
|
||||
rm.audit.log.maxbackupindex=20
|
||||
log4j.logger.org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger=${rm.audit.logger}
|
||||
log4j.additivity.org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger=false
|
||||
log4j.appender.RMAUDIT=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.RMAUDIT.File=${hadoop.log.dir}/rm-audit.log
|
||||
log4j.appender.RMAUDIT.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.RMAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
|
||||
log4j.appender.RMAUDIT.MaxFileSize=${rm.audit.log.maxfilesize}
|
||||
log4j.appender.RMAUDIT.MaxBackupIndex=${rm.audit.log.maxbackupindex}
|
||||
|
||||
#
|
||||
# YARN NodeManager audit logging
|
||||
#
|
||||
nm.audit.logger=INFO,NullAppender
|
||||
nm.audit.log.maxfilesize=256MB
|
||||
nm.audit.log.maxbackupindex=20
|
||||
log4j.logger.org.apache.hadoop.yarn.server.nodemanager.NMAuditLogger=${nm.audit.logger}
|
||||
log4j.additivity.org.apache.hadoop.yarn.server.nodemanager.NMAuditLogger=false
|
||||
log4j.appender.NMAUDIT=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.NMAUDIT.File=${hadoop.log.dir}/nm-audit.log
|
||||
log4j.appender.NMAUDIT.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.NMAUDIT.layout.ConversionPattern=%d{ISO8601}%p %c{2}: %m%n
|
||||
log4j.appender.NMAUDIT.MaxFileSize=${nm.audit.log.maxfilesize}
|
||||
log4j.appender.NMAUDIT.MaxBackupIndex=${nm.audit.log.maxbackupindex}
|
||||
|
||||
# HS audit log configs
|
||||
#mapreduce.hs.audit.logger=INFO,HSAUDIT
|
||||
#log4j.logger.org.apache.hadoop.mapreduce.v2.hs.HSAuditLogger=${mapreduce.hs.audit.logger}
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
# d) ... or set them directly
|
||||
# export YARN_RESOURCEMANAGER_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:${HADOOP_LOG_DIR}/gc-rm.log-$(date +'%Y%m%d%H%M')"
|
||||
#
|
||||
# e) Enable ResourceManager audit logging
|
||||
# export YARN_RESOURCEMANAGER_OPTS="-Drm.audit.logger=INFO,RMAUDIT"
|
||||
#
|
||||
#
|
||||
# export YARN_RESOURCEMANAGER_OPTS=
|
||||
|
||||
|
@ -71,6 +74,9 @@
|
|||
# These options will be appended to the options specified as HADOOP_OPTS
|
||||
# and therefore may override any similar flags set in HADOOP_OPTS
|
||||
#
|
||||
# a) Enable NodeManager audit logging
|
||||
# export YARN_NODEMANAGER_OPTS="-Dnm.audit.logger=INFO,NMAUDIT"
|
||||
#
|
||||
# See ResourceManager for some examples
|
||||
#
|
||||
#export YARN_NODEMANAGER_OPTS=
|
||||
|
|
Loading…
Reference in New Issue