cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Stepura (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6381) Refactor nodetool
Date Wed, 08 Jan 2014 00:29:50 GMT


Mikhail Stepura commented on CASSANDRA-6381:

Command specific comments:
* INFO - prints the token at the end of output. The old implementation prints it first. Not
sure if it's important
* REBUILD_INDEX - The 3rd argument (comma separated list of indexes) will not be split, and
will be used as is.
* REMOVETOKEN - will just print a warning and exit. The old implementation would call  REMOVENODE
after a warning. Not sure if it's important
* REPAIR - I believe {{!startToken.isEmpty() && !endToken.isEmpty()}} condition is
wrong, and doesn’t match the original {{cmd.hasOption(START_TOKEN_OPT.left) || cmd.hasOption(END_TOKEN_OPT.left)}}.
 There should be OR instead of AND
* SETCOMPACTIONTHRESHOLD - the combination of {{minthreshold == maxthreshold == 0}} is no
more valid. Not sure if it’s important
* STATUS - doesn’t contain changes from CASSANDRA-2238 (

Commands missing in the new implementation

General comment - all the commands share the same structure of {{run()}} method: 
        public void run()
            try (NodeProbe probe = connect())
                  <command specific calls>
            } catch (IOException e)
                throw new RuntimeException("Error while closing JMX connection", e);
I believe it can be moved up into the base class ({{NodeToolCmd}}) , so each concrete command
will just need to implement  an abstract method.

The above is specifically true for the commands sprung from {{optionalKSandCFs}} method.

> Refactor nodetool
> -----------------
>                 Key: CASSANDRA-6381
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Yuki Morishita
>            Assignee: Clément Lardeur
>            Priority: Minor
>              Labels: lhf, nodetool
>         Attachments: trunk-6381.patch
> We have way too many nodetool commands(more than 40) packed in one NodeCmd class. And
we are trying to add more commands.
> could be a good fit to take out each command into
sub command class.

This message was sent by Atlassian JIRA

View raw message