HBASE-3598 Broken formatting in LRU stats output

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1092585 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-04-15 04:31:44 +00:00
parent 840e08634b
commit 535e0abc54
2 changed files with 4 additions and 2 deletions

View File

@ -72,6 +72,7 @@ Release 0.91.0 - Unreleased
HBASE-3723 Major compact should be done when there is only one storefile
and some keyvalue is outdated (Zhou Shuaifeng via Stack)
HBASE-3624 Only one coprocessor of each priority can be loaded for a table
HBASE-3598 Broken formatting in LRU stats output (Erik Onnen)
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -569,11 +569,12 @@ public class LruBlockCache implements BlockCache, HeapSize {
"blocks=" + size() +", " +
"accesses=" + stats.getRequestCount() + ", " +
"hits=" + stats.getHitCount() + ", " +
"hitRatio=" + StringUtils.formatPercent(stats.getHitRatio(), 2) + "%, "+
"hitRatio=" +
(stats.getHitCount() == 0 ? "0" : (StringUtils.formatPercent(stats.getHitRatio(), 2) + "%, ")) +
"cachingAccesses=" + stats.getRequestCachingCount() + ", " +
"cachingHits=" + stats.getHitCachingCount() + ", " +
"cachingHitsRatio=" +
StringUtils.formatPercent(stats.getHitCachingRatio(), 2) + "%, " +
(stats.getHitCachingCount() == 0 ? "0" : (StringUtils.formatPercent(stats.getHitCachingRatio(), 2) + "%, ")) +
"evictions=" + stats.getEvictionCount() + ", " +
"evicted=" + stats.getEvictedCount() + ", " +
"evictedPerRun=" + stats.evictedPerEviction());