Created on 08-15-2018 06:25 PM
Below properties can be used to configure the log4j settings for size based compressed backup.
Here is an example for Hive service.
log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout log4j.appender.DRFA=org.apache.log4j.rolling.RollingFileAppender log4j.appender.DRFA.rollingPolicy=org.apache.log4j.rolling.FixedWindowRollingPolicy log4j.appender.DRFA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTriggeringPolicy log4j.appender.DRFA.rollingPolicy.ActiveFileName =${hive.log.dir}/${hive.log.file}.log log4j.appender.DRFA.rollingPolicy.FileNamePattern=${hive.log.dir}/${hive.log.file}-.%i.log.gz log4j.appender.DRFA.triggeringPolicy.MaxFileSize=10000 log4j.appender.DRFA.rollingPolicy.maxIndex=10
For some reason maxfilesize is not working if used like 1MB like that - so use live above.
Note: please check console log (.out or .err) for any WARNINGS if does not work
Created on 05-28-2019 10:35 AM
Hi Amarnath,
Will this work for Oozie? If not do you have similar log4j setting for oozie?
Thanks,
Sajin