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

Mikhail Stepura commented on CASSANDRA-6381:
--------------------------------------------

Merci, I'm almost happy :) Just remove unused imports from the top.

h6. Suggestion
Would it be better to keep only valid commands in the history? Like that
{code}
            Runnable command = parser.parse(args);
            printHistory(args);
            command.run();
{code}

h5. QUESTION
The only open question we have is which condition for REPAIR is correct?
{quote}
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? 
{quote}
The old version is 
{code:java|title=CURRENT}
                    if (cmd.hasOption(START_TOKEN_OPT.left) || 
cmd.hasOption(END_TOKEN_OPT.left))
                        probe.forceRepairRangeAsync(...);
                    else
                        probe.forceRepairAsync(...);
                    break;
{code}
The proposed version is
{code:java|title=PROPOSED}
                    if (!startToken.isEmpty() && !endToken.isEmpty())
                        probe.forceRepairRangeAsync(...);
                    else
                        probe.forceRepairAsync(...);
{code}

[~jbellis] [~yukim] what do you think?

> 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-v3.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