From 61735778e936e4275532235a8b2f061623537e7c Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Tue, 1 Nov 2011 19:32:53 +0000 Subject: [PATCH] HBASE-3680 Publish more metrics about mslab git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1196232 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/hadoop/hbase/regionserver/MemStore.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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);