You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Oleksandr Petrov <ol...@gmail.com> on 2012/09/23 21:22:55 UTC

CQL 2, CQL 3 and Thrift confusion

Hi,

I'm currently using Cassandra 1.1.5.

When I'm trying to create a Keyspace from CQL 2 with a command (`cqlsh -2`):

  CREATE KEYSPACE TestKeyspace WITH strategy_class = 'SimpleStrategy' AND
strategy_options:replication_factor = 1

Then try to access it from CQL 3 (`cqlsh -3`):

  USE TestKeyspace;

I get an error: Bad Request: Keyspace 'testkeyspace' does not exist

Same thing is applicable to Thrift Interface. Somehow, I can only access
keyspaces created from CQL 2 via Thrift Interface.

Basically, I get same exact error: InvalidRequestException(why:There is no
ring for the keyspace: CascadingCassandraCql3)

Am I missing some switch? Or maybe it is intended to work that way?...
Thanks!

-- 
alex p

Re: CQL 2, CQL 3 and Thrift confusion

Posted by Oleksandr Petrov <ol...@gmail.com>.
Yup, that was exactly the cause. Somehow I could not figure out why it was
downcasing my keyspace name all the time.
May be good to put it somewhere in reference material with a more detailed
explanation.

On Sun, Sep 23, 2012 at 9:30 PM, Sylvain Lebresne <sy...@datastax.com>wrote:

> In CQL3, names are case insensitive by default, while they were case
> sensitive in CQL2. You can force whatever case you want in CQL3
> however using double quotes. So in other words, in CQL3,
>   USE "TestKeyspace";
> should work as expected.
>
> --
> Sylvain
>
> On Sun, Sep 23, 2012 at 9:22 PM, Oleksandr Petrov
> <ol...@gmail.com> wrote:
> > Hi,
> >
> > I'm currently using Cassandra 1.1.5.
> >
> > When I'm trying to create a Keyspace from CQL 2 with a command (`cqlsh
> -2`):
> >
> >   CREATE KEYSPACE TestKeyspace WITH strategy_class = 'SimpleStrategy' AND
> > strategy_options:replication_factor = 1
> >
> > Then try to access it from CQL 3 (`cqlsh -3`):
> >
> >   USE TestKeyspace;
> >
> > I get an error: Bad Request: Keyspace 'testkeyspace' does not exist
> >
> > Same thing is applicable to Thrift Interface. Somehow, I can only access
> > keyspaces created from CQL 2 via Thrift Interface.
> >
> > Basically, I get same exact error: InvalidRequestException(why:There is
> no
> > ring for the keyspace: CascadingCassandraCql3)
> >
> > Am I missing some switch? Or maybe it is intended to work that way?...
> > Thanks!
> >
> > --
> > alex p
>



-- 
alex p

Re: CQL 2, CQL 3 and Thrift confusion

Posted by Sylvain Lebresne <sy...@datastax.com>.
In CQL3, names are case insensitive by default, while they were case
sensitive in CQL2. You can force whatever case you want in CQL3
however using double quotes. So in other words, in CQL3,
  USE "TestKeyspace";
should work as expected.

--
Sylvain

On Sun, Sep 23, 2012 at 9:22 PM, Oleksandr Petrov
<ol...@gmail.com> wrote:
> Hi,
>
> I'm currently using Cassandra 1.1.5.
>
> When I'm trying to create a Keyspace from CQL 2 with a command (`cqlsh -2`):
>
>   CREATE KEYSPACE TestKeyspace WITH strategy_class = 'SimpleStrategy' AND
> strategy_options:replication_factor = 1
>
> Then try to access it from CQL 3 (`cqlsh -3`):
>
>   USE TestKeyspace;
>
> I get an error: Bad Request: Keyspace 'testkeyspace' does not exist
>
> Same thing is applicable to Thrift Interface. Somehow, I can only access
> keyspaces created from CQL 2 via Thrift Interface.
>
> Basically, I get same exact error: InvalidRequestException(why:There is no
> ring for the keyspace: CascadingCassandraCql3)
>
> Am I missing some switch? Or maybe it is intended to work that way?...
> Thanks!
>
> --
> alex p