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:34:29 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 65cbb6c2e -> 7f2c1cade


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/7f2c1cad
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7f2c1cad
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7f2c1cad

Branch: refs/heads/branch-1.3
Commit: 7f2c1cade7307d9a16c35f52313c3af318fa282a
Parents: 65cbb6c
Author: Jingcheng Du <jingcheng.du@intel.com>
Authored: Wed Jun 29 17:32:22 2016 +0800
Committer: Jingcheng Du <jingcheng.du@intel.com>
Committed: Wed Jun 29 17:32:22 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/7f2c1cad/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 56ccf62..35fd1ae 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();
   }
 
@@ -505,7 +508,6 @@ class MetricsRegionServerWrapperImpl
     synchronized public void run() {
       try {
         initBlockCache();
-        cacheStats = blockCache.getStats();
 
         HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution();
         HDFSBlocksDistribution hdfsBlocksDistributionSecondaryRegions =


Mime
View raw message