[ https://issues.apache.org/jira/browse/ZOOKEEPER-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14617558#comment-14617558 ]
Raul Gutierrez Segales commented on ZOOKEEPER-1423: --------------------------------------------------- Thanks for the patch [~eribeiro]! A few nits: In: {code} + @Override + public long getDataDirSize() { + if (zkDb == null) return 0L; + File path = zkDb.snapLog.getDataDir(); + return getDirSize(path); + } + + @Override + public long getLogDirSize() { {code} please use {} for if statements, even the body only has 1 statement. I.e.: {code} + public long getDataDirSize() { + if (zkDb == null) { + return 0L; + } + File path = zkDb.snapLog.getDataDir(); + return getDirSize(path); + } {code} Ditto for getLogDirSize(). Other than, lgtm. Will do one more pass after the nits are addressed - thanks! > 4lw and jmx should expose the size of the datadir/datalogdir > ------------------------------------------------------------ > > Key: ZOOKEEPER-1423 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1423 > Project: ZooKeeper > Issue Type: Improvement > Components: jmx > Affects Versions: 3.5.0 > Reporter: Patrick Hunt > Assignee: Edward Ribeiro > Labels: newbie > Attachments: ZOOKEEPER-1423.2.patch, ZOOKEEPER-1423.3.patch, > ZOOKEEPER-1423.4.patch, ZOOKEEPER-1423.patch > > > There are no metrics currently available on the size of the > datadir/datalogdir. These grow w/o bound unless the cleanup script is run. It > would be good to expose these metrics through jmx/4lw such that monitoring > can be done on the size. Would key ppl in on whether cleanup was actually > running. In particular this could be monitored/alerted on by third party > systems (nagios, ganglia and the like). -- This message was sent by Atlassian JIRA (v6.3.4#6332)