You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Pavel Yaskevich (JIRA)" <ji...@apache.org> on 2010/10/23 12:46:20 UTC

[jira] Commented: (CASSANDRA-615) refactor o.a.c.cli.CliClient

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

Pavel Yaskevich commented on CASSANDRA-615:
-------------------------------------------

I have already done some good refactoring on getCfDef area and asserts (which crash whole CLI). First thing I'm going to do will be changing CommonTree to Tree where it is required (almost everywhere), then I will move all help methods into CLIHelpStatements class (right now cliClient is overloaded with them), after that I will think that can be done which messages and stuff...

> refactor o.a.c.cli.CliClient
> ----------------------------
>
>                 Key: CASSANDRA-615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-615
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Eric Evans
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 0.7.1
>
>
> There is a lot of code duplication when it comes to decomposing commands into keyspace, column family, keys, columns, etc, and validating the results. There would be even more if the error handling was more thorough.
> I think the cleanest way is to create a class that accepts a CommonTree in its constructor and assigns the results to members. A custom exception can be thrown for validation errors and CliClient can simply trap these, print the descriptive .msg, and return.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.