[ https://issues.apache.org/jira/browse/HBASE-4141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vikram Srivastava updated HBASE-4141: ------------------------------------- Attachment: LruBlockCache_HBASE_4141.patch Fixed the brackets. Currently the comma would not be printed if the value is zero. > Fix LRU stats message > --------------------- > > Key: HBASE-4141 > URL: https://issues.apache.org/jira/browse/HBASE-4141 > Project: HBase > Issue Type: Bug > Components: regionserver > Reporter: Lars George > Priority: Trivial > Labels: newbie > Attachments: LruBlockCache_HBASE_4141.patch > > > Currently the DEBUG message looks like this: > {noformat} > 2011-07-26 04:21:52,344 DEBUG org.apache.hadoop.hbase.io.hfile.LruBlockCache: > LRU Stats: total=3.24 MB, free=391.76 MB, max=395 MB, blocks=0, > accesses=118458, hits=0, hitRatio=0.00%%, cachingAccesses=0, cachingHits=0, > cachingHitsRatio=�%, evictions=0, evicted=0, evictedPerRun=NaN > {noformat} > Note the double percent on "hitRatio", and the stray character at > "cachingHitsRatio". > The former is a added by the code in LruBlockCache.java: > {code} > ... > "hitRatio=" + > (stats.getHitCount() == 0 ? "0" : > (StringUtils.formatPercent(stats.getHitRatio(), 2) + "%, ")) + > ... > {code} > The StringUtils already adds a percent sign, so the trailing one here can be > dropped. > The latter I presume is caused by the value not between 0.0 and 1.0. This > should be checked and "NaN" or so displayed instead as is done for other > values. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira