CASSANDRA-20876: Offline nodetool commands should not print network options in help#4871
Open
arvindKandpal-ksolves wants to merge 1 commit into
Open
CASSANDRA-20876: Offline nodetool commands should not print network options in help#4871arvindKandpal-ksolves wants to merge 1 commit into
arvindKandpal-ksolves wants to merge 1 commit into
Conversation
…ptions in help - Added isOfflineCommand() to AbstractCommand to publicly expose whether a command requires a JMX connection - Updated CassandraCliHelpLayout to suppress JmxConnect options in help output for offline commands - Updated help snapshot for 'history' to reflect the correct output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Offline nodetool commands (e.g.
history) do not require a JMX connection,yet their
--helpoutput was showing network-related options like--host,--port,--password, etc. This is misleading and unnecessary.Changes
AbstractCommand.java: Added a publicisOfflineCommand()method thatsafely wraps the existing
protected shouldConnect()to expose whether acommand requires a JMX connection.
CassandraCliHelpLayout.java: UpdatedparentCommandOptionsWithJmxOptions()to suppress
JmxConnectoptions from help output when the command is offline.NodetoolCommandoptions are still always shown for backwards compatibility.test/resources/nodetool/help/history: Updated help snapshot to reflectthe corrected output — JMX network options are no longer shown for
history.patch by Arvind Kandpal; reviewed by TBD for CASSANDRA-20876