You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Miklosovic (Jira)" <ji...@apache.org> on 2026/06/24 10:38:00 UTC
[jira] [Comment Edited] (CASSANDRA-20876) Offline nodetool commands should not print network options in help
[ https://issues.apache.org/jira/browse/CASSANDRA-20876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18091149#comment-18091149 ]
Stefan Miklosovic edited comment on CASSANDRA-20876 at 6/24/26 10:37 AM:
-------------------------------------------------------------------------
Alright there is one small bug I would like to discuss, I was about to merge this and I just quickly tried it how it behaves and hit it ...
The problem is that when I execute something like "nodetool history" and I look into the history file, there is
{code:java}
2026-06-24 12:31:57,853: -p 7199 history
{code}
but {{-p 7199}} should not be there, right? {{-p}} is added via nodetool script everywhere and then it is logged. My idea was to do something like this (1) but the problem with it is that, for some yet unknown reason, {{commandLine.getCommandSpec().userObject()}} returns an object which is an instance of {{org.apache.cassandra.tools.nodetool.NodetoolCommand}} not {{{}LocalCommand{}}}.
(1) [https://github.com/apache/cassandra/compare/trunk...smiklosovic:cassandra:CASSANDRA-20876-wip?expand=1]
That all being said, I am OK to merge this and create a follow-up ticket. Curious what [~mmuzaf] thinks about this.
was (Author: smiklosovic):
Alright there is one small bug I would like to discuss, I was about to merge this and I just quickly tried it how it behaves and hit it ...
The problem is that when I execute something like "nodetool history" and I look into the history file, there is
{code}
2026-06-24 12:31:57,853: -p 7199 history
{code}
but {{-p 7199}} should not be there, right? {{-p}} is added via nodetool script everywhere and then it is logged. My idea was to do something like this (1) but the problem with it is that, for some yet unknown reason, {{commandLine.getCommandSpec().userObject()}} returns an object which is an instance of {{org.apache.cassandra.tools.nodetool.NodetoolCommand}} not {{LocalCommand}}.
(1) https://github.com/apache/cassandra/compare/trunk...smiklosovic:cassandra:CASSANDRA-20876-wip?expand=1
> Offline nodetool commands should not print network options in help
> ------------------------------------------------------------------
>
> Key: CASSANDRA-20876
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20876
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Tool/nodetool
> Reporter: Stefan Miklosovic
> Assignee: Arvind Kandpal
> Priority: Normal
> Labels: lhf
> Fix For: 6.x, 7.x
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> There is no reason to print "network related options" like port, password etc. for offline nodetool commands like "history" and similar.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org