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 b435df3cf53..37dc16c9b6e 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 @@ -265,10 +265,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;