cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Resolved] (CASSANDRA-2529) CQL: Cassandra CLI allows a simple create keyspace statement, but CQL does not
Date Thu, 21 Apr 2011 21:25:05 GMT


Jonathan Ellis resolved CASSANDRA-2529.

       Resolution: Not A Problem
    Fix Version/s:     (was: 0.8.0)

This is a case where the cli violates the second part of "as simple as possible, but no simpler."
The cli makes three assumptions for replication strategy if it is not specified:

- you want NetworkTopologyStrategy (reasonable, but wait)
- you are using SimpleSnitch (not often the case in production -- and Snitch is pluggable
so it may not even be a Snitch class we ship with)
- you want one replica in the datacenter containing the node you are connecting to (how is
this intuitive?)

Now, I said defaulting to NTS is reasonable, but if we make that the default and only require
specifying strategy_options it confuses people when we then explain that the options differ
based on which strategy class you are using. So it makes the most sense to keep everything
explicit. ("in the face of ambiguity, refuse the temptation to guess.")

tl;dr we screwed up, but rather than break peoples' CLI scripts we're taking the opportunity
offered by CQL to fix it.

> CQL: Cassandra CLI allows a simple create keyspace statement, but CQL does not
> ------------------------------------------------------------------------------
>                 Key: CASSANDRA-2529
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: 3 nodes on rackspace running Centos 5.5
> Cassandra 0.8 build 30:
>            Reporter: Cathy Daw
>            Priority: Minor
>              Labels: cql
> *CQL*
> {code}
> cqlsh> create keyspace testcql0;
> Bad Request: line 1:20 mismatched input ';' expecting K_WITH
> {code}
> *Cassandra CLI*
> {code}
> [default@unknown] create keyspace testcli0;
> 3535f660-6c4f-11e0-0000-710abe20addf
> Waiting for schema agreement...
> ... schemas agree across the cluster
> [default@unknown] describe keyspace testcli0;
> Keyspace: none:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [datacenter1:1]
>   Column Families:
> {code}

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message