hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jingchen...@apache.org
Subject hbase git commit: HBASE-15976 RegionServerMetricsWrapperRunnable will be failure when disable blockcache.
Date Wed, 29 Jun 2016 09:10:57 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 be1d92d22 -> ceda27494


HBASE-15976 RegionServerMetricsWrapperRunnable will be failure  when disable blockcache.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ceda2749
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ceda2749
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ceda2749

Branch: refs/heads/0.98
Commit: ceda27494b6e01b7668db44dc1280eeda5fb443d
Parents: be1d92d
Author: Jingcheng Du <jingcheng.du@intel.com>
Authored: Wed Jun 29 17:10:00 2016 +0800
Committer: Jingcheng Du <jingcheng.du@intel.com>
Committed: Wed Jun 29 17:10:00 2016 +0800

----------------------------------------------------------------------
 .../hbase/regionserver/MetricsRegionServerWrapperImpl.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ceda2749/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
----------------------------------------------------------------------
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 9e29c6b..d08dc9c 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
@@ -279,6 +279,9 @@ class MetricsRegionServerWrapperImpl
 
   @Override
   public long getBlockCacheFailedInsertions() {
+    if (this.cacheStats == null) {
+      return 0;
+    }
     return this.cacheStats.getFailedInserts();
   }
 
@@ -441,7 +444,6 @@ class MetricsRegionServerWrapperImpl
     @Override
     synchronized public void run() {
       initBlockCache();
-      cacheStats = blockCache.getStats();
 
       HDFSBlocksDistribution hdfsBlocksDistribution =
           new HDFSBlocksDistribution();


Mime
View raw message