janhoy commented on code in PR #5063:
URL: https://github.com/apache/solr/pull/5063#discussion_r4380712842


##########
solr/core/src/java/org/apache/solr/cli/StatusTool.java:
##########
@@ -72,37 +72,17 @@ public class StatusTool extends ToolBase {
       description = "Wait up to the specified number of seconds to see Solr 
running.")
   private Integer maxWaitSecs;
 
-  @picocli.CommandLine.ArgGroup(exclusive = true, multiplicity = "0..1")
-  private TargetOptions targetOptions;
-
-  static class TargetOptions {
-    @picocli.CommandLine.Option(
-        names = {"-p", "--port"},
-        description = "Port on localhost to check status for")
-    private Integer port;
-
-    @picocli.CommandLine.Option(
-        names = {"-s", "--solr-connection"},
-        description =
-            "Zookeeper or HTTP(s) connection string; unnecessary if 
SOLR_CONNECTION is defined in solr.in.sh; otherwise, defaults to "
-                + CommonCLIOptions.DefaultValues.ZK_HOST
-                + '.')
-    private String solrConnection;
-
-    @picocli.CommandLine.Option(
-        names = {"--solr-url"},
-        description =
-            "Base Solr URL, which can be used to determine the zk-host if 
that's not known")
-    private String solrUrl;
-
-    @picocli.CommandLine.Option(
-        names = {"-z", "--zk-host"},
-        description =
-            "Zookeeper connection string; unnecessary if ZK_HOST is defined in 
solr.in.sh; otherwise, defaults to "
-                + CommonCLIOptions.DefaultValues.ZK_HOST
-                + '.')
-    private String zkHost;
-  }
+  @picocli.CommandLine.Option(
+      names = {"-p", "--port"},
+      paramLabel = "PORT",
+      description = "Port on localhost to check status for")
+  private Integer portOpt;

Review Comment:
   `--port` is not a connection target but a way of addressing a Solr process 
on this machine: `status --port 8983` goes through 
`SolrProcessManager.processForPort()` and inspects local processes, and with no 
port and no connection option it scans them all rather than contacting a URL. 
It is also not shared the way the connection options are — `start`, `stop` and 
`run example` declare `-p/--port` as "the port to bind the listener to" and mix 
in no `ConnectionOptions` at all, and `-p` is already `--param` in `package 
deploy`. What `status` does need is `--port` being mutually exclusive with the 
connection options, and that is wired in `StatusTool.callTool()` reusing 
`explicitOptionNames()`/`mutuallyExclusiveMessage()` so the error text matches 
the other tools.
   



-- 
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]

Reply via email to