diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java b/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java index 48e1acc86be..7ba72c28817 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java @@ -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() { for (KeyValue kv: this.kvset) { LOG.info(kv);