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

Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
Biju Nair 2017-08-23 13:10:04 -04:00 committed by tedyu
parent 338232f81f
commit ad22437d05
2 changed files with 6 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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());
}
}
}