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
338232f81f
commit
ad22437d05
|
@ -46,6 +46,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 com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
@ -1152,7 +1153,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,4 +156,4 @@ public class TestBlockCacheReporting {
|
||||||
}
|
}
|
||||||
return cbsbf;
|
return cbsbf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue