Skip to content

Commit

Permalink
Get CF level disk usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuj Phadke committed Aug 5, 2022
1 parent 4d1d0ab commit 8b95ee1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,22 @@ public JSONObject estimateKeys() throws JSONException {
return object;
}

public JSONObject getCFDiskUsage() {
Iterator<Entry<String, ColumnFamilyStoreMBean>> it =
super.getColumnFamilyStoreMBeanProxies();
JSONObject object = new JSONObject();
JSONObject object = new JSONObject();

while (it.hasNext()) {
Entry<String, ColumnFamilyStoreMBean> 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());
Expand Down

0 comments on commit 8b95ee1

Please sign in to comment.