Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E5A8C6B0 for ; Wed, 17 Jul 2013 11:38:39 +0000 (UTC) Received: (qmail 12578 invoked by uid 500); 17 Jul 2013 11:38:36 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 12551 invoked by uid 500); 17 Jul 2013 11:38:36 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 12543 invoked by uid 99); 17 Jul 2013 11:38:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 11:38:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.138.90.77] (HELO nm14.bullet.mail.ne1.yahoo.com) (98.138.90.77) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 11:38:27 +0000 Received: from [98.138.90.49] by nm14.bullet.mail.ne1.yahoo.com with NNFMP; 17 Jul 2013 11:38:06 -0000 Received: from [98.138.101.179] by tm2.bullet.mail.ne1.yahoo.com with NNFMP; 17 Jul 2013 11:38:06 -0000 Received: from [127.0.0.1] by omp1090.mail.ne1.yahoo.com with NNFMP; 17 Jul 2013 11:38:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 31835.1817.bm@omp1090.mail.ne1.yahoo.com Received: (qmail 61881 invoked by uid 60001); 17 Jul 2013 11:38:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1374061085; bh=0TLJwSDbCq5/PJ/Kyc6Jp6plZnxiWDxbrWFXd+leV+E=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=aCaBEmJa8Fa+qFMxUfXDe014GgujfDr8TxCFJ293dY6mEL0hpjYKfrjMtnas4n6PUZ3agUTOj1kZNANMg2j9XIQoN84slpI6+GQJm9oDru4ytEtm3MsIZoSZN6HxZSwZlthO4TzS1NTaf6FRnkY/UVUkZH4Pyp6jxIr5vWS0qwY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=zEWGqLTaPIZI+YlW0oJ5psSOL4jv5kcicQKaj5tcXxegE03O2fNVNL4eSe1UrOqRuhOH8IMso9X7JhyUw82UWp3Cfl5Q5ihA1Ai+8kQY1gjpJsXMzzLjKZwAf6+qsosXSml51zI54kdY0t1E+9icCgZtgfnHBtbQQ2LYVhDICD0= ; X-YMail-OSG: nuVZUvAVM1kIoW0pYJVwArzF7wSbnDchMHhZxEYhJHmZvvw WNKY5tAA._MttuItYybuW4caISluDhPs8o4rV.UgV8mHMlqILd0BirDrOOK2 OcGxhXBCevGboXuU4zFny91OrkSFOVIXGlyJdoWEek3Zcw1bFNrXWlEWYZTZ ICvQdX3Y74tl04HmXuOb7iGLAvWTAaA62YAu5bvcKPFfOL5yhmFTvc1nPhrv YZ1arRN5YCKrMXdxzOmnXE1zh0s62oeASDk.uv54Kb6PTSWA4vw0QOvRFyAg sRwKEJavOXl.30TWK2.mVgQmc_v3Z5dMNjSciKZwgmhmI7rGcGB4HRnvJ.Pz YXmnPr7YdRCHoI1HjTv5foYBEszeeCbEmWUvk10GtBL..By62BqmWVuESAKz 6mDPoD8iqsun1JhOOQik9Vn_AFumuCQ9YJaypuhbXpbruXIuPSLwBIkpCPR_ B5jYxk..2viAMFxMXvUfdr5x3FLKUINA9Td5mFuhsoEfxQiQcUVPhtVeRvwu Ascwj2PlYvWW8JYHnqxpaOz19KszM6rpxJuvk21QwZe50qCb1N37V5KFD3dz 3iFReeM9P7a.sjzMX4m9ozsOv2LpcovQeFW.Ci.HqgJdW0LYXDP8BkL1nTQ4 rSDIb_rdgICoIarSkOamGF3YPpIrsY5.moBzNaQcnugEY2B7KgOXg5Ghs Received: from [204.228.207.218] by web121804.mail.ne1.yahoo.com via HTTP; Wed, 17 Jul 2013 04:38:05 PDT X-Rocket-MIMEInfo: 002.001,VGhhbmtzIGZvciB0aGUgYW5zd2Vycy4KwqAKVGhlIHJlYXNvbiB3aHkgSSBhc2sgaXMgaXQgaXMgc3RhdGVkIHRoZSBjb21wb3NpdGUga2V5cyBhcmUgbm90IHRoZSBzYW1lIGFzIFByaW1hcnkgS2V5LiBJIGZvdW5kIG5vIGV4YW1wbGVzIGZvciB0aHJpZnQgd2hlcmUgaXQgc3BlY2lmY2FsbHkgc2FpZCB0aGUgY29tcG9zaXRlIGtleSBpcyBhIHByaW1hcnkga2V5IHJlcXVpcmVkIGJ5IG9yZGVyIGJ5LiBBbGwgdGhlIGV4YW1wbGVzIHdoZXJlIHRoZSB3b3JkcyBwcmltYXJ5IGtleSB3ZXJlIHVzZWQgd2VyZSABMAEBAQE- X-Mailer: YahooMailWebService/0.8.148.557 References: <1374032699.76383.YahooMailNeo@web121806.mail.ne1.yahoo.com> <66ACB46D-A448-466A-99C1-1555C7A600FC@thelastpickle.com> Message-ID: <1374061085.16801.YahooMailNeo@web121804.mail.ne1.yahoo.com> Date: Wed, 17 Jul 2013 04:38:05 -0700 (PDT) From: Tony Anecito Reply-To: Tony Anecito Subject: Re: Intresting issue with getting Order By to work... To: "user@cassandra.apache.org" In-Reply-To: <66ACB46D-A448-466A-99C1-1555C7A600FC@thelastpickle.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1263564687-396482197-1374061085=:16801" X-Virus-Checked: Checked by ClamAV on apache.org ---1263564687-396482197-1374061085=:16801 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for the answers.=0A=A0=0AThe reason why I ask is it is stated the co= mposite keys are not the same as Primary Key. I found no examples for thrif= t 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=A0I am seeing postings where people had issues with Order = By but no answers like what you said.=0A=A0=0AIf there was better documenta= tion for Cassandra with working examples and explnations about the differen= ces between CQL and CLI I would not need to ask questions on the users grou= ps. I have also spotted major issues and tried to help understand them for = all users.=0A=A0=0A-Tony=0A=0AFrom: aaron morton = =0ATo: Cassandra User =0ASent: Wednesday, July = 17, 2013 4:06 AM=0ASubject: Re: Intresting issue with getting Order By to w= ork...=0A=0A=0A> The use of Order By requires Primary Key which appears to = be only supported by by using CQL and not Cassandra-cli. =0AOrder By in CQL= is the also supported on the thrift interface. =0A=0AWhen using thrift the= order you get the columns back is the order the Comparator puts them in. I= f you want them reversed the thrift API supports that. =0A=0A> I read that = thrift clients will not work with CQL created tables due to extra things cr= eated by the CQL. If so how can I create Primary Keys and be supported by t= hrift based clients??=0ANo.=0ADo not access CQL tables with the thrift API.= =0A=0A> Seems like Cassandra-cli should support creation of compound prima= ry keys or=0AIt does. =0ASee help on the CompositeType=0A=0A> Also CQL tabl= es 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.=0AThey are visible for read access. =0A=0A> I will post to= Datastax the same question =0APlease ask questions to one group at a time = so people do not waste their time providing answers you already have. =0A= =0ACheers=0A=0A=0A-----------------=0AAaron Morton=0ACassandra Consultant= =0ANew Zealand=0A=0A@aaronmorton=0Ahttp://www.thelastpickle.com/=0A=0AOn 17= /07/2013, at 3:44 PM, Tony Anecito wrote:=0A=0A> Hi A= ll,=0A> =0A> Well I got most everything working I wanted using Cassandra th= en discovered I needed to use an Order By. I am using Cassandra 1.2.5.=0A> = 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 inse= rt data that worked fine on the cli created table I now get an exception:= =0A> Error while inserting com.datastax.driver.core.exceptions.InvalidQuery= Exception: Unknown identifier type.=0A> =0A> I read that thrift clients wil= l 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 client= s??=0A> =0A> I will post to Datastax the same question but trying to unders= tand how to resolve cli vs CQL issue like this. Seems like Cassandra-cli sh= ould support creation of compound primary keys or CQL should create tables = readable by thrift based clients. Is there some meta column info people sho= uld add?=0A> Also CQL tables are not visible via cli.so I can not see detai= ls on what was created by CQL and the cqlsh script has errors according to = the latest Python windows program I tried.=0A> =0A> Thanks,=0A> -Tony=0A> = =0A> ---1263564687-396482197-1374061085=:16801 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
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 exam= ples for thrift where it specifcally said the composite key is a primary ke= y required by order by. All the examples where the words primary key were u= sed were with CQL examples and I am seeing postings where people had i= ssues 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 u= sers groups. I have also spotted major issues= and tried to help understand them for all users.
 
-Tony

From: aaron morton <aaron@thelastpickl= e.com>
To: Cassandra = User <user@cassandra.apache.org>
Sent: Wednesday, July 17, 2013 4:06 AM
Subject: Re: Intresting issue with getting O= rder By to work...

> The use of Order By requires Primary = Key which appears to be only supported by by using CQL and not Cassandra-cl= i.
Order By in CQL is the also supported on the thrift interface.
<= BR>When using thrift the order you get the columns back is the order the Co= mparator puts them in. If you want them reversed the thrift API supports th= at.

> 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 Prima= ry Keys and be supported by thrift based clients??
No.
Do not access = CQL tables with the thrift API.

> Seems like Cassandra-cli shoul= d 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 err= ors 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 Zealan= d

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

On 17/07/2013, at 3:44 P= M, Tony Anecito <adanecito@yahoo.com> wrote:

> Hi Al= l,
>
> Well I got most everything working I wanted using Cassa= ndra 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 onl= y supported by by using CQL and not Cassandra-cli. So I dropped my table cr= eated uisng CLI and used CQL and was able to create a "Table". But when I w= ent to insert data that worked fine on the cli created table I now get an exce= ption:
> Error while inserting com.datastax.driver.core.exceptions.In= validQueryException: Unknown identifier type.
>
> I read that = thrift clients will not work with CQL created tables due to extra things cr= eated by the CQL. If so how can I create Primary Keys and be supported by t= hrift based clients??
>
> I will post to Datastax the same que= stion but trying to understand how to resolve cli vs CQL issue like this. S= eems like Cassandra-cli should support creation of compound primary keys or= CQL should create tables readable by thrift based clients. Is there some m= eta 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 s= cript has errors according to the latest Python windows program I tried.>
> Thanks,
> -Tony
>
>


---1263564687-396482197-1374061085=:16801--