cassandra-commits mailing list archives

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

    [ https://issues.apache.org/jira/browse/CASSANDRA-6381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13864910#comment-13864910
] 

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 ( https://github.com/apache/cassandra/commit/76ee9a155ea14304595bc2e9755accbfded04e62)

Commands missing in the new implementation
* DISABLEHANDOFF
* DISABLETHRIFT
* DRAIN
* TPSTATS
* TRUNCATEHINTS

General comment - all the commands share the same structure of {{run()}} method: 
{code:java}
        @Override
        public void run()
        {
            try (NodeProbe probe = connect())
            {
                  <command specific calls>
            } catch (IOException e)
            {
                throw new RuntimeException("Error while closing JMX connection", e);
            }
        }
{code}
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: https://issues.apache.org/jira/browse/CASSANDRA-6381
>             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.
> https://github.com/airlift/airline could be a good fit to take out each command into
sub command class.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message