smiklosovic commented on code in PR #3750:
URL: https://github.com/apache/cassandra/pull/3750#discussion_r1890087124
##########
src/java/org/apache/cassandra/tools/nodetool/ListSnapshots.java:
##########
@@ -64,15 +63,17 @@ public void execute(NodeProbe probe)
return;
}
- final long trueSnapshotsSize = probe.trueSnapshotsSize();
TableBuilder table = new TableBuilder();
// display column names only once
- final List<String> indexNames =
snapshotDetails.entrySet().iterator().next().getValue().getTabularType().getIndexNames();
+ List<String> indexNames =
snapshotDetails.entrySet().iterator().next().getValue().getTabularType().getIndexNames();
+ indexNames.subList(0, indexNames.size() - 1);
if (includeEphemeral)
- table.add(indexNames.toArray(new String[indexNames.size()]));
- else
table.add(indexNames.subList(0, indexNames.size() -
1).toArray(new String[indexNames.size() - 1]));
+ else
Review Comment:
the below logic deals with the fact that we do not want to have another
column of "Raw true size" in the output of `nodetool listsnapshots`. All we are
interested in are the numbers we sum up internally and display that in
`TrueDiskSpaceUsed` at then end of the output.
We do have true sizes already returned, but they are in _human friendly
format_ and we can not sum these up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]