Community Articles
Find and share helpful community-sourced technical articles.
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.
Labels (1)

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

2,935 Views
Comments
New Contributor

Hi Amarnath,


Will this work for Oozie? If not do you have similar log4j setting for oozie?


Thanks,

Sajin


Don't have an account?
Version history
Last update:
‎08-15-2018 06:25 PM
Updated by:
Contributors
Top Kudoed Authors