HBASE-3680 Publish more metrics about mslab

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1196232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-11-01 19:32:53 +00:00
parent d5364c2bfd
commit 61735778e9
1 changed files with 12 additions and 0 deletions

View File

@ -136,6 +136,18 @@ public class MemStore implements HeapSize {
} }
} }
/**
* @return the number of bytes "wasted" by external fragmentation
* in the MSLAB, if configured.
*/
long getMslabWaste() {
if (allocator != null) {
return allocator.getWastedBytes();
} else {
return 0;
}
}
void dump() { void dump() {
for (KeyValue kv: this.kvset) { for (KeyValue kv: this.kvset) {
LOG.info(kv); LOG.info(kv);