incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahryar Sedghi <shsed...@gmail.com>
Subject Re: Cassandra 1.2 Thrift and CQL 3 issue
Date Sat, 12 Jan 2013 18:39:43 GMT
Thanks Brian

it is not the same issue, and stack trace is different. It is a simple test
case and I have 3 columns and I populate all of them with:
cqlsh:somedb> CREATE TABLE  test(interval int,id text, body text, primary
key (interval, id));
cqlsh:somedb> insert into test (interval, id, body) values(3, 'key3',
'body3');
cqlsh:somedb> insert into test (interval, id, body) values(1, 'key1',
'body1');
cqlsh:somedb> insert into test (interval, id, body) values(2, 'key2',
'body2');

as you see in your case it was explicitly dealing with CQL3 on the
Cassandra side. I think in my case it is not recognizing it as CQL3.

*at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062)
*
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)

as in my case it does not get  to the same class

    *at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:4036)
*
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
    at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)


I am doing something wrong on client side that Cassandra thinks it is  CQL2
(aka. cql). How do you tell thrift it is CQL 3?

Thanks


On Sat, Jan 12, 2013 at 12:48 PM, Shahryar Sedghi <shsedghi@gmail.com>wrote:

> Hi
>
> I am trying to test my application that runs with JDBC, CQL 3 with
> Cassandra 1.2. After getting many weird errors and downgrading from JDBC to
> thrift, I realized the thrift on Cassandra 1.2 has issues with wide rows.
> If I define the table as:
>
> CREATE TABLE  test(interval int,id text, body text, primary key (interval,
> id));
>
> select interval, id, body from test;
>
>  fails with:
>
> ERROR [Thrift:16] 2013-01-11 18:23:35,997 CustomTThreadPoolServer.java
> (line 217) Error occurred during processing of message.
> java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
>     at
> org.apache.cassandra.config.CFMetaData.getColumnDefinitionFromColumnName(CFMetaData.java:923)
>     at
> org.apache.cassandra.cql.QueryProcessor.processStatement(QueryProcessor.java:502)
>     at
> org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:789)
>     at
> org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1652)
>     at
> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:4048)
>     at
> org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:4036)
>     at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
>     at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
>     at
> org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
>     at java.lang.Thread.run(Thread.java:780)
>
> Same code works well with Cassandra 1.1.
>
> At the same time, if I define the table as:
> CREATE TABLE  test1(interval int,id text, body text, primary key
> (interval));
>
> everything works fine. I am using
>
> DataStax Community 1.2
>
> apache-cassandra-clientutil-1.2.0.jar
> apache-cassandra-thrift-1.2.0.jar
> libthrift-0.7.0.jar
>
> Apparently client.set_cql_version("3.0.0"); has no effect either. Is there
> a setting that I miss on the client side to dictate cql3 or it is a bug?
>
> Thanks in advance
>
> Shahryar
>
> --
> "Life is what happens while you are making other plans." ~ John Lennon
>



-- 
"Life is what happens while you are making other plans." ~ John Lennon

Mime
View raw message