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..548820909 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,30 @@ public JSONObject estimateKeys() throws JSONException { return object; } + /** + * Get CF level disk usage + * + * @return + */ + public JSONObject getCFDiskUsage() throws JSONException { + Iterator> it = + super.getColumnFamilyStoreMBeanProxies(); + 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", + super.getColumnFamilyMetric( + entry.getKey(), + entry.getValue().getColumnFamilyName(), + "liveDiskSpaceUsed")); + } + return object; + } + public JSONObject info() throws JSONException { JSONObject object = new JSONObject(); object.put("gossip_active", isInitialized());