From b93c08d358392de7617d2ae5ed50671293fc2954 Mon Sep 17 00:00:00 2001 From: Jingcheng Du Date: Wed, 29 Jun 2016 16:37:23 +0800 Subject: [PATCH] HBASE-15976 RegionServerMetricsWrapperRunnable will be failure when disable blockcache. - Addendum --- .../hbase/regionserver/MetricsRegionServerWrapperImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java index 7e6d87c4856..35fd1aeaafa 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java @@ -317,6 +317,9 @@ class MetricsRegionServerWrapperImpl @Override public long getBlockCacheFailedInsertions() { + if (this.cacheStats == null) { + return 0; + } return this.cacheStats.getFailedInserts(); }