-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CASSANDRA-20151 enable filtering of snapshots on keyspace, table and snapshot name #3752
base: trunk
Are you sure you want to change the base?
Conversation
0564415
to
37df341
Compare
@Option(title = "snapshot", | ||
name = { "-n", "--snapshot"}, | ||
description = "Include snapshots of specified name") | ||
private String snapshotName = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A cautious reader sees that there is no logic related to filtering on the server side in this PR. This is because these changes are already there, we just do not exercise that functionality yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, -s
for snapshot name flag would be more appropriate but we are saving that for sorting functionality which will come next, where -s
is a no-brainer which will match -s
flag in nodetool status
.
* <pre> | ||
* no_ttl: "true" or "false" | ||
* include_ephemeral: "true" or "false" | ||
* keyspace: name of keyspace to get snapshots of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the server side logic, I see that keyspace, table and snapshot can be null. Should we document here what's the behavior on those cases?
{ | ||
return Arrays.stream(listSnapshotsStdOut.split("\n")) | ||
.filter(line -> !line.isEmpty()) | ||
.filter(line -> !line.startsWith("Snapshot Details:") && !line.startsWith("There are no snapshots")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: Is there any benefit from adding two filters with a &&
operator as opposed to four single filters on this stream?
No description provided.