netudima commented on code in PR #2497: URL: https://github.com/apache/cassandra/pull/2497#discussion_r2098957914
########## src/java/org/apache/cassandra/tools/nodetool/SetCacheCapacity.java: ########## @@ -17,28 +17,40 @@ */ 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.Optional; 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; @Command(name = "setcachecapacity", description = "Set global key, row, and counter cache capacities (in MB units)") -public class SetCacheCapacity extends NodeToolCmd +public class SetCacheCapacity extends AbstractCommand { - @Arguments(title = "<key-cache-capacity> <row-cache-capacity> <counter-cache-capacity>", - usage = "<key-cache-capacity> <row-cache-capacity> <counter-cache-capacity>", - description = "Key cache, row cache, and counter cache (in MB)", - required = true) + @CassandraUsage(usage = "<key-cache-capacity> <row-cache-capacity> <counter-cache-capacity>", + description = "Key cache, row cache, and counter cache (in MB)") private List<Integer> args = new ArrayList<>(); + @Parameters(paramLabel = "key-cache-capacity", description = "Key cache capacity in MB", arity = "0..1", index = "0") Review Comment: should it be mandatory? -- 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