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:29:22 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 7d33f824b -> 947ea85b0


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

Branch: refs/heads/branch-1.2
Commit: 947ea85b0c086a022d7b50868b8499a0560331ad
Parents: 7d33f82
Author: Jingcheng Du <jingcheng.du@intel.com>
Authored: Wed Jun 29 17:26:48 2016 +0800
Committer: Jingcheng Du <jingcheng.du@intel.com>
Committed: Wed Jun 29 17:26:48 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/947ea85b/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 6b86df2..ce47aa5 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
@@ -313,6 +313,9 @@ class MetricsRegionServerWrapperImpl
 
   @Override
   public long getBlockCacheFailedInsertions() {
+    if (this.cacheStats == null) {
+      return 0;
+    }
     return this.cacheStats.getFailedInserts();
   }
 
@@ -461,7 +464,6 @@ class MetricsRegionServerWrapperImpl
     synchronized public void run() {
       try {
         initBlockCache();
-        cacheStats = blockCache.getStats();
 
         HDFSBlocksDistribution hdfsBlocksDistribution = new HDFSBlocksDistribution();
         HDFSBlocksDistribution hdfsBlocksDistributionSecondaryRegions =


Mime
View raw message