You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2012/08/28 22:41:07 UTC
[jira] [Resolved] (HBASE-4141) Fix LRU stats message
[ https://issues.apache.org/jira/browse/HBASE-4141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lars Hofhansl resolved HBASE-4141.
----------------------------------
Resolution: Duplicate
In trunk this is fixed.
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira