[ 
https://issues.apache.org/jira/browse/CASSANDRA-6381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clément Lardeur updated CASSANDRA-6381:
---------------------------------------

    Attachment: trunk-6381-v2.patch

+Command specific comments+ :
bq. INFO - prints the token at the end of output. The old implementation prints 
it first. Not sure if it's important

It's printed at the end of output to keep the same behavior with or without -T 
option.

bq. REBUILD_INDEX - The 3rd argument (comma separated list of indexes) will not 
be split, and will be used as is.

The old behavior (csv format) was not really POSIX-like argument conventions. 

bq. REMOVETOKEN - will just print a warning and exit. The old implementation 
would call REMOVENODE after a warning. Not sure if it's important

I don't know if it's important. The message is :
_Warn: removetoken is deprecated, please use removenode instead_

bq. REPAIR - I believe !startToken.isEmpty() && !endToken.isEmpty() condition 
is wrong, and doesn’t match the original.

I ask myself if the old condition was good or not. Is it possible to have just 
the option --start-token without --end-token and vice versa? 

bq. SETCOMPACTIONTHRESHOLD - the combination of minthreshold == maxthreshold == 
0 is no more valid. Not sure if it’s important

It was not possible before, see the condition in NodeCmd :
{code:java}
if (minthreshold < 2 && maxthreshold != 0)    { badUse("Min threshold must be 
at least 2"); }
{code}

bq. STATUS - doesn’t contain changes from CASSANDRA-2238 ( 
https://github.com/apache/cassandra/commit/76ee9a155ea14304595bc2e9755accbfded04e62)

Add the --resolve-ip option. *Done.*

+Missing commands+ :
 
* DISABLEHANDOFF - *Done.*
* DISABLETHRIFT - *Done.*
* DRAIN - *Done.*
* TPSTATS - *Done.*
* TRUNCATEHINTS - *Done.*

+General comment+ :

Move into {{NodeToolCmd}} the duplicated code and create the abstract method 
{{execute()}} implemented by each specific command.



> 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-v2.patch, 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)

Reply via email to