You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mason Bryant (JIRA)" <ji...@apache.org> on 2010/06/17 23:29:23 UTC

[jira] Created: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

CliClient Support for add, drop, and rename should be added for keyspace and column family
------------------------------------------------------------------------------------------

                 Key: CASSANDRA-1204
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
             Project: Cassandra
          Issue Type: Improvement
          Components: Tools
    Affects Versions: 0.7
            Reporter: Mason Bryant
             Fix For: 0.7


Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.

Eg:

add keyspace <keyspace>                                      Add a new keyspace.
add column family <cf>[comparator]                      Add a new column family.
drop keyspace <keyspace>                                      Delete a keyspace.
drop column family <cf>                                  Delete a column family.
rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
rename column family <name>=<new_name>                   Rename a column family.

Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882282#action_12882282 ] 

Mason Bryant commented on CASSANDRA-1204:
-----------------------------------------

I'm working on this, actual paying job slowing progress.

additionally, I'd like to add:

help <command> to give more detailed help for each command. Primarily to support the array of attributes available for the create keyspace and column family commands. Let me know if objections.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894038#action_12894038 ] 

Hudson commented on CASSANDRA-1204:
-----------------------------------

Integrated in Cassandra #504 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/504/])
    minor grammatical and formatting nits w/ help text

Patch by eevans for CASSANDRA-1204
cli support for keyspace/cf add, drop, and rename

Patch by Mason Bryant; review by eevans for CASSANDRA-1204


> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Mason Bryant
>            Assignee: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7 beta 1
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff, cli_new_methods4.diff, cli_new_methods5.diff, cli_unit_tests.diff, cli_unit_tests2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Attachment: cli_new_methods4.diff
                cli_unit_tests2.diff

Attached.

I corrected the unrelated bracket placement because you commented on it in the first review and I assumed that since there were no styleguide violations in my diffs the convention was to correct them all in files as they are updated.

Anyway, new diffs are attached.

Minor change to the unit tests to fix a test that was failing as a result of updates. Other than that just merging.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff, cli_new_methods4.diff, cli_unit_tests.diff, cli_unit_tests2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Attachment: cli_new_methods3.diff



src/java/org/apache/cassandra/cli/Cli.g:
     added grammars for add, drop, rename for namespace and column family
     removed a few pre-existing tabs and replaced with spaces

src/java/org/apache/cassandra/cli/CliClient.java:
     implementations of add, drop, rename for namespace and column family commands
     updated the help command accordingly
     added help text with examples for each command
     describe keyspace prints the keyspace name and prints the name of each column family.
     removed a few pre-existing tabs and replaced with spaces
     corrected some pre-existing brace placement conflicts with the style guide

src/java/org/apache/cassandra/thrift/CassandraServer.java:
    sends the name for each column family in a call to describe keyspace
    system_drop_keyspace fails if authentication is enabled.
    removed a few pre-existing tabs and replaced with spaces

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893360#action_12893360 ] 

Eric Evans commented on CASSANDRA-1204:
---------------------------------------

Thanks Mason, I'll have another look.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff, cli_new_methods4.diff, cli_new_methods5.diff, cli_unit_tests.diff, cli_unit_tests2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Attachment: cli_new_methods.diff

attaching a patch which I believe adds these features.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>             Fix For: 0.7
>
>         Attachments: cli_new_methods.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880944#action_12880944 ] 

Mason Bryant commented on CASSANDRA-1204:
-----------------------------------------

Thanks, I'll work on these.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Attachment: cli_new_methods5.diff

>> There are still a lot of unrelated changes here (mostly things like whitespace, brace placement, etc). If you are not putting these patches together with a VCS, then I'll accept that this time, but try and avoid that going forward since it makes reviewing more difficult and the history less concise.
    No problem, removed them all with the exception of a couple bracket placement changes that were adjacent to code I was touching anyway.
 
>> You added the column family name to the maps returned in describe_keyspace(), which unless I'm missing something is redundant since the outer map is keyed by column family name.
     Thanks, my mistake. Removed.

>> The main help synopsis is wrong (wasn't updated for the last command syntax changes you made).
    Corrected. This involved some reformatting.

>> Help text should wrap at some standardized column width. That has been 80 chars and while I'd personally like to see us keep it there, something wider is possible so long as it is consistent.
     Ok, I've put in a bunch more wrapping, should all be wrapping at 80 chars now.
 
>>  I'm also not a fan of the conditionals with regular expressions used for drilling down to command specific help. It would be better if this were parsed with antlr like everything else, and added to the command completer.
     added to the command completer
     replaced the stuff using regex with more ANTLR in Cli.g and a switch statement.
 
>> I'm not sure what to do with the tests you have here. On the one hand, I'd love to have tests, but on the other, the need to have an instance already running (separately started) is kind of a deal-breaker.
    OK, like I said I don't see how they'd fit in either. Consider them un-submitted.

Also: enable strict reads in CliMain.java and writes to be consistent with http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraDaemon.java?r1=979438&r2=979437&pathrev=979438


> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7.0
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff, cli_new_methods4.diff, cli_new_methods5.diff, cli_unit_tests.diff, cli_unit_tests2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881039#action_12881039 ] 

Eric Evans commented on CASSANDRA-1204:
---------------------------------------

{quote}
I'm looking over your comments, and a bit confused (or
maybe I just don't agree) with the create keyspace syntax you are
suggesting. It seems that you are suggesting the following:

        create keyspace <keyspace>[placement_strategy=value ]
        create keyspace <keyspace>[placement_strategy=value
[replication_factor = value ] ]

        eg:
          create keyspace foo[placement_strategy=RackUnawareStrategy]
          create keyspace foo[placement_strategy=RackUnawareStrategy
[replication_factor = 3 ]]
{quote}

No, I was suggesting something like...

{noformat}
create keyspace Foo with placement = RackUnawareStrategy and replication_factor = 3
create column family Bar with comparator = BytesType and rowscached = 10000
{noformat}

{quote}
But this looks unlike the syntax for the gets and sets and looks
somewhat messier than below this:

          create keyspace foo[RackUnawareStrategy]
          create keyspace foo[RackUnawareStrategy][3]
{quote}

Right. This syntax is similar to how lists are subscripted in some languages, which is a pretty good analogy for the data access bits (get and set), but doesn't make any sense here IMO.

{quote}
So, am I reading you right, if so, how do you feel about the above
modifications to your corrections?
{quote}

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Attachment: cli_unit_tests.diff

Also:

Unit tests.

I'm not sure they are suitable for inclusion because they depend on a running Cassandra Server at localhost and expect a couple of keyspaces to not be present (it does a bunch of creating, modifying, and dropping of those keyspace so if they did exist, they'd be destroyed in the testing so the tests just fail if they are present).

They were useful for my work on the cli, so here they are.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff, cli_unit_tests.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Priority: Minor  (was: Major)

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888367#action_12888367 ] 

Eric Evans commented on CASSANDRA-1204:
---------------------------------------

There are still a lot of unrelated changes here (mostly things like whitespace, brace placement, etc). If you are not putting these patches together with a VCS, then I'll accept that this time, but try and avoid that going forward since it makes reviewing more difficult and the history less concise.

A few other things:
 * You added the column family name to the maps returned in describe_keyspace(), which unless I'm missing something is redundant since the outer map is keyed by column family name.
 * The main help synopsis is wrong (wasn't updated for the last command syntax changes you made).
 * Help text should wrap at some standardized column width. That has been 80 chars and while I'd personally like to see us keep it there, something wider is possible so long as it is consistent.
 * I'm also not a fan of the conditionals with regular expressions used for drilling down to command specific help. It would be better if this were parsed with antlr like everything else, and added to the command completer.
 * I'm not sure what to do with the tests you have here. On the one hand, I'd love to have tests, but on the other, the need to have an instance already running (separately started) is kind of a deal-breaker.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff, cli_new_methods4.diff, cli_unit_tests.diff, cli_unit_tests2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887913#action_12887913 ] 

Eric Evans commented on CASSANDRA-1204:
---------------------------------------

Can you please rebase this against trunk? Also, this is a text book example of why you should avoid introducing unrelated changes to whitespace, since that is actually what's causing the conflict that prevents the patches from applying.



> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff, cli_new_methods3.diff, cli_unit_tests.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Attachment: cli_new_methods2.diff

update (ignore previous diff)

src/java/org/apache/cassandra/cli/Cli.g:
    added grammars for add, drop, rename for namespace and column family

src/java/org/apache/cassandra/cli/CliClient.java:
    implementations of same commands
    updated the help command accordingly
    describe keyspace prints the keyspace name and prints the name of each column family.

src/java/org/apache/cassandra/thrift/CassandraServer.java:
    sends the name for each column family in a call to describe keyspace
    added a method checkLoginAuthorization to so that keyspace does not always need to be checked
   updated system_drop_keyspace to not check to see if the user is currently in a keyspace as that shouldn't matter

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880853#action_12880853 ] 

Eric Evans commented on CASSANDRA-1204:
---------------------------------------

Thanks Mason. I'm looking at this.

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Commented: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880915#action_12880915 ] 

Eric Evans commented on CASSANDRA-1204:
---------------------------------------

First off, there are lots of whitespace issues (mixed tabs and spaces), and instances of incorrect brace placement. See http://wiki.apache.org/CodyStyle.

Also, I'm not a fan of the syntax used for keyspace and column family creation here. Could we try something like: {{create (keyspace|column family) name with attr=value [and attr=value [and...]]}}? I'm also not a fan of the renames, how about something like: {{rename (keyspace|column family) <src> <dst>}}?

All of these new commands should be setup to work with command completion.

And finally, authentication is kind of a mess in that it operates under the assumption that priviliges are tied to a keyspace. I think that (for now anyway), I'd prefer to see {{system_drop_keyspace()}} operate the same way that {{system_add_keyspace()}} does (namely that it is rejected outright when authentication is enabled).

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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


[jira] Updated: (CASSANDRA-1204) CliClient Support for add, drop, and rename should be added for keyspace and column family

Posted by "Mason Bryant (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mason Bryant updated CASSANDRA-1204:
------------------------------------

    Attachment:     (was: cli_new_methods.diff)

> CliClient Support for add, drop, and rename should be added for keyspace and column family
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1204
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1204
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 0.7
>            Reporter: Mason Bryant
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: cli_new_methods2.diff
>
>
> Should add support for the add, drop, and rename operations to keyspace and column family in the CliClient.
> Eg:
> add keyspace <keyspace>                                      Add a new keyspace.
> add column family <cf>[comparator]                      Add a new column family.
> drop keyspace <keyspace>                                      Delete a keyspace.
> drop column family <cf>                                  Delete a column family.
> rename keyspace <keyspace>=<keyspace_new_name>                Rename a keyspace.
> rename column family <name>=<new_name>                   Rename a column family.
> Note: I have patch built for this, but drop keyspace corrupts the schema and prevents the node from restarting due to a bug elsewhere (see: CASSANDRA-1203)

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