diff --git a/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java b/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java index 7f8d62540..11b185443 100644 --- a/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java +++ b/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java @@ -271,6 +271,22 @@ public JSONObject estimateKeys() throws JSONException { return object; } + public JSONObject getCFDiskUsage() { + Iterator> it = + super.getColumnFamilyStoreMBeanProxies(); + JSONObject object = new JSONObject(); + JSONObject object = new JSONObject(); + + while (it.hasNext()) { + Entry entry = it.next(); + object.put("keyspace", entry.getKey()); + object.put("column_family", entry.getValue().getColumnFamilyName()); + object.put("live_disk_size", (long) super.getColumnFamilyMetric(entry.getKey(), + entry.getValue().getColumnFamilyName(), "liveDiskSpaceUsed")); + } + return object; + } + public JSONObject info() throws JSONException { JSONObject object = new JSONObject(); object.put("gossip_active", isInitialized());