@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