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 17:55:06 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 4111f3981 -> 3071dc2fd


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

Branch: refs/heads/branch-1.4
Commit: 3071dc2fd3486d8fd2ea132a65c340eaeebbf0e0
Parents: 4111f39
Author: Biju Nair <gs.biju@gmail.com>
Authored: Wed Aug 23 13:10:04 2017 -0400
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed Aug 23 10:54:59 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/3071dc2f/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 f427e04..334e848 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
@@ -46,6 +46,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 com.google.common.annotations.VisibleForTesting;
@@ -1152,7 +1153,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/3071dc2f/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 3b9161c..7ce9679 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
@@ -118,7 +118,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());
       }
     }
   }
@@ -156,4 +156,4 @@ public class TestBlockCacheReporting {
     }
     return cbsbf;
   }
-}
\ No newline at end of file
+}


Mime
View raw message