You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2011/09/01 15:47:09 UTC

[jira] [Created] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

Cli syntax for creating keyspace is inconsistent in 1.0
-------------------------------------------------------

                 Key: CASSANDRA-3119
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.0
            Reporter: Sylvain Lebresne
            Priority: Minor
             Fix For: 1.0


In 0.8, to create a keyspace you could do:
{noformat}
create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
{noformat}

In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
{noformat}
strategy_options = {replication_factor:3}
{noformat}
(and note that reversely, this syntax doesn't work in 0.8).

I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.

We should either:
# revert to the old syntax
# support both the new and old syntax
# at least print a meaningful error message when the old syntax is used

Imho, the last solution is by far the worst solution.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

Jonathan Ellis updated CASSANDRA-3119:
--------------------------------------

    Reviewer: xedin

> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>         Attachments: v1-0001-CASSANDRA-3119-warn-on-old-cli-syntax.txt
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

Pavel Yaskevich reassigned CASSANDRA-3119:
------------------------------------------

    Assignee: T Jake Luciani  (was: Pavel Yaskevich)

it seems like the best move here will be to support both [{}] and {} in there because it's imposible to say what caused that "null" because it fails somewhere deep in ANTLR (in most cases when recognition was failed ANTLR throws standard exceptions which we handle correctly as "Command not found" or "Syntax error").

> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

Jonathan Ellis commented on CASSANDRA-3119:
-------------------------------------------

I'm in favor of 3., because the old syntax was broken -- we never actually supported a list there, which is what it implies.

> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

Hudson commented on CASSANDRA-3119:
-----------------------------------

Integrated in Cassandra #1085 (See [https://builds.apache.org/job/Cassandra/1085/])
    Fix inconsistency of the CLI syntax when {} should be used instead of [{}]
patch by Jake Luciani; reviewed by Pavel Yaskevich for CASSANDRA-3119

xedin : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1166367
Files : 
* /cassandra/trunk/CHANGES.txt
* /cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
* /cassandra/trunk/test/unit/org/apache/cassandra/cli/CliTest.java


> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>         Attachments: v1-0001-CASSANDRA-3119-warn-on-old-cli-syntax.txt
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

T Jake Luciani updated CASSANDRA-3119:
--------------------------------------

    Attachment: v1-0001-CASSANDRA-3119-warn-on-old-cli-syntax.txt

> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>         Attachments: v1-0001-CASSANDRA-3119-warn-on-old-cli-syntax.txt
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

T Jake Luciani commented on CASSANDRA-3119:
-------------------------------------------

The patch accepts both new and old syntax, also warns the user when they use [{}]




> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>         Attachments: v1-0001-CASSANDRA-3119-warn-on-old-cli-syntax.txt
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

Jonathan Ellis reassigned CASSANDRA-3119:
-----------------------------------------

    Assignee: Pavel Yaskevich

As mentioned on the other ticket, this should also be described in NEWS.

> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3119) Cli syntax for creating keyspace is inconsistent in 1.0

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

Eric Evans commented on CASSANDRA-3119:
---------------------------------------

bq. ... the old syntax was broken – we never actually supported a list there, which is what it implies.

I agree completely, but a user whose script has broken is still going to be irritated.

These things are like paper cuts, they aren't a huge deal when looked at in isolation, but they add up to a negative experience pretty quickly.

> Cli syntax for creating keyspace is inconsistent in 1.0
> -------------------------------------------------------
>
>                 Key: CASSANDRA-3119
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3119
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sylvain Lebresne
>            Assignee: T Jake Luciani
>            Priority: Minor
>              Labels: cli
>             Fix For: 1.0
>
>
> In 0.8, to create a keyspace you could do:
> {noformat}
> create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
> {noformat}
> In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:
> {noformat}
> strategy_options = {replication_factor:3}
> {noformat}
> (and note that reversely, this syntax doesn't work in 0.8).
> I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.
> We should either:
> # revert to the old syntax
> # support both the new and old syntax
> # at least print a meaningful error message when the old syntax is used
> Imho, the last solution is by far the worst solution.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira