You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/09/19 12:43:02 UTC

[GitHub] [cassandra] smiklosovic commented on a diff in pull request #1828: CASSANDRA-16860

smiklosovic commented on code in PR #1828:
URL: https://github.com/apache/cassandra/pull/1828#discussion_r974203433


##########
src/java/org/apache/cassandra/tools/nodetool/ClearSnapshot.java:
##########
@@ -43,34 +46,60 @@ public class ClearSnapshot extends NodeToolCmd
     @Option(title = "clear_all_snapshots", name = "--all", description = "Removes all snapshots")
     private boolean clearAllSnapshots = false;
 
+    @Option(title = "older_than", name = "--older-than", description = "Clear snapshots older than specified time period.")
+    private String olderThan;
+
+    @Option(title = "older_than_timestamp", name = "--older-than-timestamp", description = "Clear snapshots older than specified timestamp.")
+    private Long olderThanTimestamp;
+
     @Override
     public void execute(NodeProbe probe)
     {
-        if(snapshotName.isEmpty() && !clearAllSnapshots)
+        if (snapshotName.isEmpty() && !clearAllSnapshots)
             throw new RuntimeException("Specify snapshot name or --all");
 
-        if(!snapshotName.isEmpty() && clearAllSnapshots)
+        if (!snapshotName.isEmpty() && clearAllSnapshots)

Review Comment:
   @pauloricardomg why is not it a good idea to be able to use it when "--all" is not specified? You might want to remove snapshots only per table or per keyspace and not touch the others.



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org