incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Anecito <adanec...@yahoo.com>
Subject Re: Intresting issue with getting Order By to work...
Date Thu, 18 Jul 2013 15:12:52 GMT
Many Thanks Aaron!!
 
As I work more with CQL and CLI as some other posting I have seen regarding usage I am thinking
that CLI for keyspace and Column Family setup and maintenance is best
 while CQL for queries/inserts ect is best. Mainly I am thinking this because of better control
over the schema using CLI.
 
I will look over your links carefully.
-Tony
  

________________________________
 From: aaron morton <aaron@thelastpickle.com>
To: Cassandra User <user@cassandra.apache.org> 
Sent: Thursday, July 18, 2013 2:21 AM
Subject: Re: Intresting issue with getting Order By to work...
  


Here are some posts about CQL and Thrift

 http://thelastpickle.com/2013/01/11/primary-keys-in-cql/
http://www.datastax.com/dev/blog/cql3-for-cassandra-experts
http://www.datastax.com/dev/blog/thrift-to-cql3

Hope that helps. 

-----------------
Aaron Morton
Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com/  

On 17/07/2013, at 11:38 PM, Tony Anecito <adanecito@yahoo.com> wrote:

Thanks for the answers. 
>  
>The reason why I ask is it is stated the composite keys are not the same as Primary Key.
I found no examples for thrift where it specifcally said the composite key is a primary key
required by order by. All the examples where the words primary key were used were with CQL
examples and I am seeing postings where people had issues with Order By but no answers like
what you said. 
>  
>If there was better documentation for Cassandra with working examples and explnations
about the differences between CQL and CLI I would not need to ask questions on the users groups.
I have also spotted major issues and tried to help understand them for all users. 
>  
>-Tony 
>
> 
>
>________________________________
>From: aaron morton <aaron@thelastpickle.com>
>To: Cassandra User <user@cassandra.apache.org> 
>Sent: Wednesday, July 17, 2013 4:06 AM
>Subject: Re: Intresting issue with getting Order By to work...
> 
>
>> The use of Order By requires Primary Key which appears to be only supported by by
using CQL and not Cassandra-cli. 
>Order By in CQL is the also supported on the thrift interface. 
>
>When using thrift the order you get the columns back is the order the Comparator puts
them in. If you want them reversed the thrift API supports that. 
>
>> I read that thrift clients will not work with CQL created tables due to extra things
created by the CQL. If so how can I create Primary Keys and be supported by thrift based clients??
>No.
>Do not access CQL tables with the thrift API. 
>
>> Seems like Cassandra-cli should support creation of compound primary keys or
>It does. 
>See help on the CompositeType
>
>> Also CQL tables are not visible via cli.so I can not see details on what was created
by CQL and the cqlsh script has errors according to the latest Python windows program I tried.
>They
 are visible for read access. 
>
>> I will post to Datastax the same question 
>Please ask questions to one group at a time so people do not waste their time providing
answers you already have. 
>
>Cheers
>
>
>-----------------
>Aaron Morton
>Cassandra Consultant
>New Zealand
>
>@aaronmorton
>http://www.thelastpickle.com/
>
>On 17/07/2013, at 3:44 PM, Tony Anecito <adanecito@yahoo.com> wrote:
>
>> Hi All,
>> 
>> Well I got most everything working I wanted using Cassandra then discovered I needed
to use an Order By. I am using Cassandra 1.2.5.
>> The use of Order By requires Primary Key which appears to be only supported by by
using CQL and not Cassandra-cli. So I dropped my table created uisng CLI and used CQL and
was able to create a "Table". But when I went
 to insert data that worked fine on the cli created table I now get an exception:
>> Error while inserting com.datastax.driver.core.exceptions.InvalidQueryException:
Unknown identifier type.
>> 
>> I read that thrift clients will not work with CQL created tables due to extra things
created by the CQL. If so how can I create Primary Keys and be supported by thrift based clients??
>> 
>> I will post to Datastax the same question but trying to understand how to resolve
cli vs CQL issue like this. Seems like Cassandra-cli should support creation of compound primary
keys or CQL should create tables readable by thrift based clients. Is there some meta column
info people should add?
>> Also CQL tables are not visible via cli.so I can not see details on what was created
by CQL and the cqlsh script has errors according to the latest Python windows program I tried.
>> 
>> Thanks,
>> -Tony
>> 
>> 
>
>
>
Mime
View raw message