Mmuzaf commented on code in PR #2497:
URL: https://github.com/apache/cassandra/pull/2497#discussion_r2204600490


##########
src/java/org/apache/cassandra/tools/nodetool/GetSSTables.java:
##########
@@ -17,36 +17,48 @@
  */
 package org.apache.cassandra.tools.nodetool;
 
-import static com.google.common.base.Preconditions.checkArgument;
-import io.airlift.airline.Arguments;
-import io.airlift.airline.Command;
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import io.airlift.airline.Option;
 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 com.google.common.base.Preconditions.checkArgument;
+import static org.apache.cassandra.tools.nodetool.CommandUtils.concatArgs;
 
 @Command(name = "getsstables", description = "Print the sstable filenames that 
own the key")
-public class GetSSTables extends NodeToolCmd
+public class GetSSTables extends AbstractCommand
 {
-    @Option(title = "hex_format",
-           name = {"-hf", "--hex-format"},
-           description = "Specify the key in hexadecimal string format")
+    @Option(paramLabel = "hex_format",
+            names = { "-hf", "--hex-format" },
+            description = "Specify the key in hexadecimal string format")
     private boolean hexFormat = false;
 
-    @Option(name={"-l", "--show-levels"}, description="If the table is using 
leveled compaction the level of each sstable will be included in the output 
(Default: false)")
+    @Option(names = { "-l", "--show-levels" }, description = "If the table is 
using leveled compaction the level of each sstable will be included in the 
output (Default: false)")
     private boolean showLevels = false;
 
-    @Arguments(usage = "<keyspace> <cfname> <key>", description = "The 
keyspace, the column family, and the key")
+    @CassandraUsage(usage = "<keyspace> <cfname> <key>", description = "The 
keyspace, the column family, and the key")
     private List<String> args = new ArrayList<>();
 
+    @Parameters(paramLabel = "keyspace", index = "0", arity = "0..1", 
description = "The keyspace")

Review Comment:
   https://github.com/apache/cassandra/pull/2497#discussion_r2204598272



##########
src/java/org/apache/cassandra/tools/nodetool/SetCompactionThreshold.java:
##########
@@ -17,26 +17,41 @@
  */
 package org.apache.cassandra.tools.nodetool;
 
-import static com.google.common.base.Preconditions.checkArgument;
-import static java.lang.Integer.parseInt;
-import io.airlift.airline.Arguments;
-import io.airlift.airline.Command;
-
 import java.util.ArrayList;
 import java.util.List;
 
 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.Parameters;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.lang.Integer.parseInt;
+import static org.apache.cassandra.tools.nodetool.CommandUtils.concatArgs;
 
 @Command(name = "setcompactionthreshold", description = "Set min and max 
compaction thresholds for a given table")
-public class SetCompactionThreshold extends NodeToolCmd
+public class SetCompactionThreshold extends AbstractCommand
 {
-    @Arguments(title = "<keyspace> <table> <minthreshold> <maxthreshold>", 
usage = "<keyspace> <table> <minthreshold> <maxthreshold>", description = "The 
keyspace, the table, min and max threshold", required = true)
+    @CassandraUsage(usage = "<keyspace> <table> <minthreshold> 
<maxthreshold>", description = "The keyspace, the table, min and max threshold")
     private List<String> args = new ArrayList<>();
 
+    @Parameters(paramLabel = "keyspace", description = "The keyspace name", 
arity = "0..1", index = "0")

Review Comment:
   https://github.com/apache/cassandra/pull/2497#discussion_r2204598272



-- 
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-unsubscr...@cassandra.apache.org

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


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

Reply via email to