diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index e2d6ba061bc..3a7680a99ac 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -3632,7 +3632,6 @@ public class HRegionServer extends HasThread implements return CacheEvictionStats.builder() .withEvictedBlocks(evictedBlocks) - .withMaxCacheSize(blockCache.getMaxSize()) .build(); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java index a77856aaa67..1bcb70f3db2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java @@ -3462,6 +3462,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler, stats.addException(region.getRegionInfo().getRegionName(), e); } } + stats.withMaxCacheSize(regionServer.getCacheConfig().getBlockCache().getMaxSize()); return builder.setStats(ProtobufUtil.toCacheEvictionStats(stats.build())).build(); } }