Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

HDP/Hbase log size limit?

avatar
Explorer

How can i limit size and number of HDP logs in /var/logs, in particular for HBase?

2 REPLIES 2

avatar
Expert Contributor

@Victor L

This can be done via Ambari UI. For each component (example HBase) there are configuration options for log file size, number, rotation etc. This is done via Log4j.

For example for HBase, the default is:

hbase.log.maxfilesize=256MB
hbase.log.maxbackupindex=20

HBase uses, the DRFA "org.apache.log4j.DailyRollingFileAppender". If you want the log rotation to happen based on filesize, then you should consider using - "org.apache.log4j.RollingFileAppender".

You can tune the Log4j as per your exact requirement.

Hope this helps.

Regards

Ravi

avatar
Explorer

The real problem is: hbase.log.maxfilesize is set to 256MB by default but it seems to can grow to GBs size, fill disk and cause disk failure