hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-4141) Fix LRU stats message
Date Tue, 26 Jul 2011 11:56:09 GMT
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


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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message