netudima commented on code in PR #2497:
URL: https://github.com/apache/cassandra/pull/2497#discussion_r2094158029
##########
src/java/org/apache/cassandra/tools/nodetool/Cleanup.java:
##########
@@ -17,32 +17,43 @@
*/
package org.apache.cassandra.tools.nodetool;
-import io.airlift.airline.Arguments;
-import io.airlift.airline.Command;
-
import java.util.ArrayList;
import java.util.List;
-import io.airlift.airline.Option;
import org.apache.cassandra.schema.SchemaConstants;
import org.apache.cassandra.tools.NodeProbe;
-import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
+import org.apache.cassandra.tools.nodetool.layout.CassandraUsage;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+import picocli.CommandLine.Parameters;
+
+import static org.apache.cassandra.tools.nodetool.CommandUtils.concatArgs;
+import static
org.apache.cassandra.tools.nodetool.CommandUtils.parseOptionalKeyspaceNonLocal;
+import static
org.apache.cassandra.tools.nodetool.CommandUtils.parseOptionalTables;
@Command(name = "cleanup", description = "Triggers the immediate cleanup of
keys no longer belonging to a node. By default, clean all keyspaces")
-public class Cleanup extends NodeToolCmd
+public class Cleanup extends AbstractCommand
{
- @Arguments(usage = "[<keyspace> <tables>...]", description = "The keyspace
followed by one or many tables")
+ @CassandraUsage(usage = "[<keyspace> <tables>...]", description = "The
keyspace followed by one or many tables")
private List<String> args = new ArrayList<>();
- @Option(title = "jobs",
- name = {"-j", "--jobs"},
+ @Parameters(index = "0", description = "The keyspace followed by one or
many tables", arity = "0..1")
+ private String keyspace;
+
+ @Parameters (index = "1..*", description = "The tables to cleanup", arity
= "0..1")
Review Comment:
why arity is 0..1?
--
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]