hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-18614 Setting BUCKET_CACHE_COMBINED_KEY to false disables stats on RS UI
Date Wed, 23 Aug 2017 01:02:23 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 e9ea19fba -> 28909b8f1


HBASE-18614 Setting BUCKET_CACHE_COMBINED_KEY to false disables stats on RS UI

Signed-off-by: tedyu <yuzhihong@gmail.com>


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

Branch: refs/heads/branch-2
Commit: 28909b8f13a73a0c318a33e8b4641ecdffc71692
Parents: e9ea19f
Author: Biju Nair <gs.biju@gmail.com>
Authored: Fri Aug 18 16:13:13 2017 -0400
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Aug 22 18:02:17 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java     | 4 ++++
 .../apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/28909b8f/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
index c187022..dbb0d49 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
@@ -45,6 +45,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ClassSize;
 import org.apache.hadoop.hbase.util.HasThread;
 import org.apache.hadoop.util.StringUtils;
+import org.codehaus.jackson.annotate.JsonIgnore;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 
 import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
@@ -1161,7 +1162,10 @@ public class LruBlockCache implements ResizableBlockCache, HeapSize
{
   }
 
   @Override
+  @JsonIgnore
   public BlockCache[] getBlockCaches() {
+    if (victimHandler != null)
+      return new BlockCache[] {this, this.victimHandler};
     return null;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/28909b8f/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
index 5651c13..f07cc37 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheReporting.java
@@ -119,7 +119,7 @@ public class TestBlockCacheReporting {
     BlockCache [] bcs = bc.getBlockCaches();
     if (bcs != null) {
       for (BlockCache sbc: bc.getBlockCaches()) {
-        bucketCacheReport(sbc);
+        LOG.info(bc.getClass().getSimpleName() + ": " + sbc.getStats());
       }
     }
   }


Mime
View raw message