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:
parent
51d458872d
commit
3be5e8ce00
|
@ -45,6 +45,7 @@ import org.apache.hadoop.hbase.util.Bytes;
|
||||||
import org.apache.hadoop.hbase.util.ClassSize;
|
import org.apache.hadoop.hbase.util.ClassSize;
|
||||||
import org.apache.hadoop.hbase.util.HasThread;
|
import org.apache.hadoop.hbase.util.HasThread;
|
||||||
import org.apache.hadoop.util.StringUtils;
|
import org.apache.hadoop.util.StringUtils;
|
||||||
|
import org.codehaus.jackson.annotate.JsonIgnore;
|
||||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
|
import org.apache.hadoop.hbase.shaded.com.google.common.annotations.VisibleForTesting;
|
||||||
|
@ -1161,7 +1162,10 @@ public class LruBlockCache implements ResizableBlockCache, HeapSize {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@JsonIgnore
|
||||||
public BlockCache[] getBlockCaches() {
|
public BlockCache[] getBlockCaches() {
|
||||||
|
if (victimHandler != null)
|
||||||
|
return new BlockCache[] {this, this.victimHandler};
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class TestBlockCacheReporting {
|
||||||
BlockCache [] bcs = bc.getBlockCaches();
|
BlockCache [] bcs = bc.getBlockCaches();
|
||||||
if (bcs != null) {
|
if (bcs != null) {
|
||||||
for (BlockCache sbc: bc.getBlockCaches()) {
|
for (BlockCache sbc: bc.getBlockCaches()) {
|
||||||
bucketCacheReport(sbc);
|
LOG.info(bc.getClass().getSimpleName() + ": " + sbc.getStats());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue