APIClient: snapshot details should align to the API
There was a confusion in the API between key and keyspace. It was changed in the API so the JMX should be modified accordingly. After this change nodetool listsnapshots Will show the current snapshots. On scylla-jmx: Fixes #15 Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
parent
fb9f3c8961
commit
21696bec1f
@ -423,14 +423,14 @@ public class APIClient {
|
||||
return null;
|
||||
}
|
||||
|
||||
private TabularDataSupport getSnapshotData(String ks, JsonArray arr) {
|
||||
private TabularDataSupport getSnapshotData(String key, JsonArray arr) {
|
||||
TabularDataSupport data = new TabularDataSupport(
|
||||
SnapshotDetailsTabularData.TABULAR_TYPE);
|
||||
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JsonObject obj = arr.getJsonObject(i);
|
||||
if (obj.containsKey("key") && obj.containsKey("cf")) {
|
||||
SnapshotDetailsTabularData.from(obj.getString("key"), ks,
|
||||
if (obj.containsKey("ks") && obj.containsKey("cf")) {
|
||||
SnapshotDetailsTabularData.from(key, obj.getString("ks"),
|
||||
obj.getString("cf"), obj.getInt("total"),
|
||||
obj.getInt("live"), data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user