From c1d970b04d27f4b34a5d4ccd981b9fe8fc326148 Mon Sep 17 00:00:00 2001 From: anoopsjohn Date: Sat, 6 Jun 2015 08:07:45 +0530 Subject: [PATCH] HBASE-13834 Evict count not properly passed to HeapMemoryTuner. (Abhilash) --- .../apache/hadoop/hbase/regionserver/HeapMemoryManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemoryManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemoryManager.java index a66a29ce530..54480250bb1 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemoryManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemoryManager.java @@ -264,10 +264,11 @@ public class HeapMemoryManager { } private void tune() { - evictCount = blockCache.getStats().getEvictedCount() - evictCount; + long curEvictCount = blockCache.getStats().getEvictedCount(); + tunerContext.setEvictCount(curEvictCount - evictCount); + evictCount = curEvictCount; tunerContext.setBlockedFlushCount(blockedFlushCount.getAndSet(0)); tunerContext.setUnblockedFlushCount(unblockedFlushCount.getAndSet(0)); - tunerContext.setEvictCount(evictCount); tunerContext.setCurBlockCacheSize(blockCachePercent); tunerContext.setCurMemStoreSize(globalMemStorePercent); TunerResult result = null;