You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jean-Armel Luce <ja...@gmail.com> on 2012/11/11 18:49:49 UTC

In REAME.txt : CQL3 instead of CQL2 ?

Hello,

I have installed the 1.2 beta2 (download source + compil)

The CREATE SCHEMA fails if I do as explained in README.txt :

bin/cqlsh --cql3    <== --cql3 is the default in 1.2 so it is not needed
Connected to Test Cluster at localhost:9160.
[cqlsh 2.3.0 | Cassandra 1.2.0-beta2-SNAPSHOT | CQL spec 3.0.0 | Thrift
protocol 19.35.0]
Use HELP for help.
cqlsh> create keyspace jaltest WITH strategy_class = 'SimpleStrategy' AND
strategy_options:replication_factor='1';
Bad Request: line 1:82 mismatched input ':' expecting '='

If I give the CREATE SCHEMA in cql3, it works :-)
cqlsh> create keyspace jaltest with replication ={'class':
'SimpleStrategy', 'replication_factor': '1'};
cqlsh> describe keyspace jaltest;

CREATE KEYSPACE jaltest WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '1'
};

cqlsh>

It looks that the syntax of CREATE SCHEMA in the README is in CQL2, while
the syntax for connexion to cqlsh is for CQL3,
>From my point of view, it should be more friendly to write the CREATE
SCHEMA command using the CQL3 syntax rather than the CQL2 syntax in the
README.txt.

Best regards.

Jean Armel

Re: In REAME.txt : CQL3 instead of CQL2 ?

Posted by Sylvain Lebresne <sy...@datastax.com>.
I've updated the readme, thanks


On Sun, Nov 11, 2012 at 6:49 PM, Jean-Armel Luce <ja...@gmail.com> wrote:

> Hello,
>
> I have installed the 1.2 beta2 (download source + compil)
>
> The CREATE SCHEMA fails if I do as explained in README.txt :
>
> bin/cqlsh --cql3    <== --cql3 is the default in 1.2 so it is not needed
> Connected to Test Cluster at localhost:9160.
> [cqlsh 2.3.0 | Cassandra 1.2.0-beta2-SNAPSHOT | CQL spec 3.0.0 | Thrift
> protocol 19.35.0]
> Use HELP for help.
> cqlsh> create keyspace jaltest WITH strategy_class = 'SimpleStrategy' AND
> strategy_options:replication_factor='1';
> Bad Request: line 1:82 mismatched input ':' expecting '='
>
> If I give the CREATE SCHEMA in cql3, it works :-)
> cqlsh> create keyspace jaltest with replication ={'class':
> 'SimpleStrategy', 'replication_factor': '1'};
> cqlsh> describe keyspace jaltest;
>
> CREATE KEYSPACE jaltest WITH replication = {
>   'class': 'SimpleStrategy',
>   'replication_factor': '1'
> };
>
> cqlsh>
>
> It looks that the syntax of CREATE SCHEMA in the README is in CQL2, while
> the syntax for connexion to cqlsh is for CQL3,
> From my point of view, it should be more friendly to write the CREATE
> SCHEMA command using the CQL3 syntax rather than the CQL2 syntax in the
> README.txt.
>
> Best regards.
>
> Jean Armel
>