You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ji...@apache.org on 2016/06/29 09:07:43 UTC

hbase git commit: Revert "HBASE-15976 RegionServerMetricsWrapperRunnable will be failure when disable blockcache. - Addendum"

Repository: hbase
Updated Branches:
  refs/heads/0.98 e13054298 -> be1d92d22


Revert "HBASE-15976 RegionServerMetricsWrapperRunnable will be failure  when disable blockcache. - Addendum"

This reverts commit e13054298351d53529649bfdeb5f3b4724bad4d8.


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

Branch: refs/heads/0.98
Commit: be1d92d22759c750975c293e0cbcb92260f39e6d
Parents: e130542
Author: Jingcheng Du <ji...@intel.com>
Authored: Wed Jun 29 17:04:29 2016 +0800
Committer: Jingcheng Du <ji...@intel.com>
Committed: Wed Jun 29 17:04:29 2016 +0800

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


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