crossoverJie commented on code in PR #22303:
URL: https://github.com/apache/pulsar/pull/22303#discussion_r1531419005
##########
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/LoadSimulationController.java:
##########
@@ -82,50 +83,50 @@ public class LoadSimulationController {
private static final ExecutorService threadPool =
Executors.newCachedThreadPool();
- // JCommander arguments for starting a controller via main.
- @Parameters(commandDescription = "Provides a shell for the user to dictate
how simulation clients should "
+ // picocli arguments for starting a controller via main.
+ @Command(description = "Provides a shell for the user to dictate how
simulation clients should "
+ "incur load.")
private static class MainArguments {
- @Parameter(names = { "-h", "--help" }, description = "Help message",
help = true)
+ @Option(names = { "-h", "--help" }, description = "Help message", help
= true)
boolean help;
- @Parameter(names = { "--cluster" }, description = "Cluster to test
on", required = true)
+ @Option(names = { "--cluster" }, description = "Cluster to test on",
required = true)
String cluster;
- @Parameter(names = { "--clients" }, description = "Comma separated
list of client hostnames", required = true)
+ @Option(names = { "--clients" }, description = "Comma separated list
of client hostnames", required = true)
String clientHostNames;
- @Parameter(names = { "--client-port" }, description = "Port that the
clients are listening on", required = true)
+ @Option(names = { "--client-port" }, description = "Port that the
clients are listening on", required = true)
int clientPort;
}
- // JCommander arguments for accepting user input.
+ // picocli arguments for accepting user input.
private static class ShellArguments {
- @Parameter(description = "Command arguments:\n" + "trade tenant
namespace topic\n"
+ @Parameters(description = "Command arguments:\n" + "trade tenant
namespace topic\n"
+ "change tenant namespace topic\n" + "stop tenant namespace
topic\n"
+ "trade_group tenant group_name num_namespaces\n" +
"change_group tenant group_name\n"
+ "stop_group tenant group_name\n" + "script script_name\n" +
"copy tenant_name source_zk target_zk\n"
- + "stream source_zk\n" + "simulate zk\n", required = true)
+ + "stream source_zk\n" + "simulate zk\n")
Review Comment:
Add ` arity = "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]