Hi All, I have a lots of hdfs daemon logs for
1. hadoop-hdfs-datanode-<namenode host>.log
2. hadoop-hdfs-journalnode-<namenode host>.log
3. hadoop-hdfs-secondarynamenode-<namenode host>.log
4. hadoop-hdfs-namenode-<namenode host>.log
5. hadoop-hdfs-zkfc-<namenode host>.log
6. hadoop-hdfs-nfs3-<namenode host>.log
Can anyone tell how to rotate the above logs or where & how can I define the rotate policy for above logs?
By default, hadoop daemon logs should be enabled with the "RFA"(RollingFileAppender), which is configured with 250MB max size (hadoop.log.maxfilesize) for each file and 20 (hadoop.log.maxbackupindex) such backups can be kept for each daemon's logs.
So if you want to reduce the max size of each log file and/or reduce total number of max backup log files, you can change the above value in log4j.properties (Be sure to change the first log4j.properties included in the classpath).