Support Questions

Find answers, ask questions, and share your expertise

How to switch off the log rotation in hadoop

avatar
Rising Star

How to switch off the log rotation in hadoop.

The log rotation is currently done by the log4j. I am trying to collect individual log file details and also SEV levels

1 ACCEPTED SOLUTION

avatar
Master Mentor

@sanjeevan mahajan every config has a log4j properties section on every service, go to the service you need and adjust log4.properties configuration as desired. here you go https://community.hortonworks.com/articles/8882/how-to-control-size-of-log-files-for-various-hdp-c.h...

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@sanjeevan mahajan every config has a log4j properties section on every service, go to the service you need and adjust log4.properties configuration as desired. here you go https://community.hortonworks.com/articles/8882/how-to-control-size-of-log-files-for-various-hdp-c.h...

avatar
Rising Star
@Artem Ervits : Thanks a lot for the reply. So for Kafka in the above document we need to comment (hash) below mentioned properties
  1. Comment out the appender’s date pattern:
    1. #log4j.appender.kafkaAppender.DatePattern='.'yyyy-MM-dd-HH
    1. #log4j.appender.kafkaAppender=org.apache.log4j.DailyRollingFileAppender

avatar
Master Mentor

same log4j rules apply, it's no different than what you would do without Ambari. @sanjeevan mahajan