You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Shahryar Sedghi <sh...@gmail.com> on 2012/12/06 00:59:16 UTC
reversed=true for CQL 3
Hi
Is there a keyword with the same functionality as reversed=True or CQL 3 on
Cassandra 1.1.6?
Thanks in advance
Shahryar
--
"Life is what happens while you are making other plans." ~ John Lennon
Re: reversed=true for CQL 3
Posted by Rob Coli <rc...@palominodb.com>.
On Thu, Dec 6, 2012 at 5:26 PM, Shahryar Sedghi <sh...@gmail.com> wrote:
> I am on 1.1.4 now (I can go to 1.1.6 if needed) and apparently it is
> broken. I defined the table like this:
In general people on 1.1.x below 1.1.6 should upgrade to at least
1.1.6 ASAP, because all versions of 1.1.x before 1.1.6 have broken
Hinted Handoff.
> please let me know if I need to open a bug.
I unfortunately don't know whether what you are doing "should" work in
1.1.4 or not. If I were you, I'd give 1.1.6/7 a shot, and if it still
doesn't work probably file a bug. :)
=Rob
--
=Robert Coli
AIM>ALK - rcoli@palominodb.com
YAHOO - rcoli.palominob
SKYPE - rcoli_palominodb
Re: reversed=true for CQL 3
Posted by Shahryar Sedghi <sh...@gmail.com>.
Thanks Rob.
I am on 1.1.4 now (I can go to 1.1.6 if needed) and apparently it is
broken. I defined the table like this:
CREATE TABLE events(interval int,id bigint,containerName
varchar,objectName varchar,objectType varchar,
" status int, severity int, event varchar, eventType varchar,
PRIMARY KEY (interval, id)) WITH CLUSTERING ORDER BY (id
DESC);
and in cqlsh it returns the value as:
[cqlsh 2.2.0 | Cassandra 1.1.4 | CQL spec 3.0.0 | Thrift protocol 19.32.0]
Use HELP for help.
cqlsh> select id from somedb.events where interval = 1;
id
----------------------------
\x00\x04\xd08\x17X<_
\x00\x04\xd08\x17X8v
\x00\x04\xd08\x17X8u
\x00\x04\xd08\x17X4\x8c
\x00\x04\xd08\x17X0\xa3
\x00\x04\xd08\x17X,\xba
where without "with clustering" or with WITH CLUSTERING ORDER BY (id ASC)
it would return it as:
[cqlsh 2.2.0 | Cassandra 1.1.4 | CQL spec 3.0.0 | Thrift protocol 19.32.0]
Use HELP for help.
cqlsh> select id from somedb.events where interval = 1;
id
------------------
13548426280581
13548426280922
13548426280953
13548426280974
13548426280995
My real table is using uuid rather than long but that broke first,
With JDBC driver it is even worse it breaks with :
java.lang.NullPointerException
at org.apache.cassandra.cql.jdbc.TypedColumn.<init>(TypedColumn.java:44)
at
org.apache.cassandra.cql.jdbc.CassandraResultSet.createColumn(CassandraResultSet.java:972)
at
org.apache.cassandra.cql.jdbc.CassandraResultSet.populateColumns(CassandraResultSet.java:156)
at
org.apache.cassandra.cql.jdbc.CassandraResultSet.<init>(CassandraResultSet.java:130)
at
org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.doExecute(CassandraPreparedStatement.java:143)
at
org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.executeQuery(CassandraPreparedStatement.java:199)
at
com.parseix.demo.RetriveEventJDBC.retreiveEvents(RetriveEventJDBC.java:34)
at com.parseix.demo.RetriveEventJDBC.main(RetriveEventJDBC.java:18)
please let me know if I need to open a bug.
Thanks
Shahryar
On Wed, Dec 5, 2012 at 9:47 PM, Rob Coli <rc...@palominodb.com> wrote:
> On Wed, Dec 5, 2012 at 3:59 PM, Shahryar Sedghi <sh...@gmail.com>
> wrote:
> > Is there a keyword with the same functionality as reversed=True or CQL 3
> on
> > Cassandra 1.1.6?
>
> https://issues.apache.org/jira/browse/CASSANDRA-4004
>
> =Rob
>
> --
> =Robert Coli
> AIM>ALK - rcoli@palominodb.com
> YAHOO - rcoli.palominob
> SKYPE - rcoli_palominodb
>
--
"Life is what happens while you are making other plans." ~ John Lennon
Re: reversed=true for CQL 3
Posted by Rob Coli <rc...@palominodb.com>.
On Wed, Dec 5, 2012 at 3:59 PM, Shahryar Sedghi <sh...@gmail.com> wrote:
> Is there a keyword with the same functionality as reversed=True or CQL 3 on
> Cassandra 1.1.6?
https://issues.apache.org/jira/browse/CASSANDRA-4004
=Rob
--
=Robert Coli
AIM>ALK - rcoli@palominodb.com
YAHOO - rcoli.palominob
SKYPE - rcoli_palominodb