arvindKandpal-ksolves opened a new pull request, #4871:
URL: https://github.com/apache/cassandra/pull/4871
## Summary
Offline nodetool commands (e.g. `history`) do not require a JMX connection,
yet their `--help` output was showing network-related options like `--host`,
`--port`, `--password`, etc. This is misleading and unnecessary.
## Changes
- **`AbstractCommand.java`**: Added a public `isOfflineCommand()` method
that
safely wraps the existing `protected shouldConnect()` to expose whether a
command requires a JMX connection.
- **`CassandraCliHelpLayout.java`**: Updated
`parentCommandOptionsWithJmxOptions()`
to suppress `JmxConnect` options from help output when the command is
offline.
`NodetoolCommand` options are still always shown for backwards
compatibility.
- **`test/resources/nodetool/help/history`**: Updated help snapshot to
reflect
the corrected output — JMX network options are no longer shown for
`history`.
patch by Arvind Kandpal; reviewed by TBD for CASSANDRA-20876
--
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]