Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1A1DDECC for ; Tue, 9 Oct 2012 06:58:55 +0000 (UTC) Received: (qmail 37972 invoked by uid 500); 9 Oct 2012 06:58:55 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 37457 invoked by uid 500); 9 Oct 2012 06:58:49 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 37422 invoked by uid 99); 9 Oct 2012 06:58:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2012 06:58:48 +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.229.145] (HELO nm38-vm1.bullet.mail.ne1.yahoo.com) (98.138.229.145) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 09 Oct 2012 06:58:39 +0000 Received: from [98.138.90.56] by nm38.bullet.mail.ne1.yahoo.com with NNFMP; 09 Oct 2012 06:58:18 -0000 Received: from [98.138.87.7] by tm9.bullet.mail.ne1.yahoo.com with NNFMP; 09 Oct 2012 06:58:18 -0000 Received: from [127.0.0.1] by omp1007.mail.ne1.yahoo.com with NNFMP; 09 Oct 2012 06:58:18 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 712977.48545.bm@omp1007.mail.ne1.yahoo.com Received: (qmail 34353 invoked by uid 60001); 9 Oct 2012 06:58:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1349765898; bh=/lfz1P4+94zh9wu1hMeqrlRJsmghqhhKrfr8ZJgZdr0=; 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=CzMz9t3M3ErqmKqRv1K8N4vd/jtQ4IgEd6nIijEXEsa+q/UIU8U03snjeNE59Bl1S5bJt2mrpJk2PeOGGNxbiOEH2vQ2Ixfuxe0Bs4WK+kvUTffuEfK7HdAG7EH8JAHb2uH/qx09jsquSa+t1JSUMSslsp0IqyB60u9u5aXObYE= 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=GlW819PTbmJMt8sWGVULBXpx07StwKDDjkRILLW1XFraejvqaLLpPRqtUsXpW1Tc3snq4bEH5QbcHfGFGJKrYJfPtJ6AyD68Wz0B8Oy+Kqj4KJV4WAjiz9i91lWuN6KOo7UoRo5Uj48iAv3UJkZNtH6QShjqkVYVF+yUzKG7Kg4=; X-YMail-OSG: CaegfUYVM1ndj205Z3PB3bfYVm3vpf7qjg0kdYhvgC9kdez JZPO6t8Og61ly3LMGRwV39HcjXWYVu5lkkAgKvIe2Bq5dYy0O5jSD2sLsyLZ 4t6fehBdJqaawAz3wjVBniGjs1ZKV47rpzeHZoIxm1f2xwGjP0DBO1KfymIg EHC58yHyBhdqXfqy8qA4aBoI_X8I94aQ29kU5qYX3KlD6i5C8aYIKdzKn0s3 _85YFzaPQA3Hze9JQKlUZdocemg9elrLZ4CsT.1JJilcTJ1Z54TaZMOi2gsZ gPcEuIpMstHaGWpMg0eNvV_TFHCpWpR_mqWQh6r.oDYJfkQ.ntoA8xDSpRnR woE19Ht2LsRc5WQtj3wXZJm70WyzFUb1KnTFCn9ILy47vD4tOEzZ.enSOkTD PNa69Q994fFTOxZyNMRgL9i2y0PzWLxZhlj8y4Oyfx.KlRPTU71jltkUbhr8 BIojW3YS6P87boETOyjcDFbV8kQYZ7svKVNCmzlSxAn.lhSivck6qP9BWudL P2xQDHTWLkU5pRGI.S0jfs9jUDkvg6AV4MRL6rrDVsddV7eJx7bH637qZCVr amgAzVa01c1MQGLcUB_j76gZ1QwqJhG6jiioIRmaF2Q8sDgnBj66.1Kun06Y CEbcBRBu5ip6z34N4aAQQgbrMQObHAVbT5ul1hnNMSMHsnOG.o_fCBmCEm0d ef.DByTvhsTkUh9dnTTffP2JpAEPDLImX0iSHhWNnMWyWeAs8qow4MGB.WlD TsmMuBNgc1w9nOYQM0A-- Received: from [115.113.49.98] by web32505.mail.mud.yahoo.com via HTTP; Mon, 08 Oct 2012 23:58:17 PDT X-Rocket-MIMEInfo: 001.001,CgpPay4gSSBhbSBhYmxlIHRvIHVuZGVyc3RhbmQgdGhlIHByb2JsZW0gbm93LiBJc3N1ZSBpczoKCklmIGkgY3JlYXRlIGEgY29sdW1uIGZhbWlseSBhbHRlcmNhdGlvbnMgYXM6CgoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqOApDUkVBVEUgVEFCTEUgYWx0ZXJjYXRpb25zICgKwqAgwqAgwqAgwqBpbnN0aWdhdG9yIHRleHQsCsKgIMKgIMKgIMKgc3RhcnRlZF9hdCABMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.450 References: <1349749102.77304.YahooMailNeo@web32504.mail.mud.yahoo.com> Message-ID: <1349765897.29752.YahooMailNeo@web32505.mail.mud.yahoo.com> Date: Mon, 8 Oct 2012 23:58:17 -0700 (PDT) From: Vivek Mishra Reply-To: Vivek Mishra Subject: Re: Compund/Composite column names To: "dev@cassandra.apache.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-981468583-548293300-1349765897=:29752" ---981468583-548293300-1349765897=:29752 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =0A=0AOk. I am able to understand the problem now. Issue is:=0A=0AIf i crea= te a column family altercations as:=0A=0A**********************************= ************************************************************************8= =0ACREATE TABLE altercations (=0A=A0 =A0 =A0 =A0instigator text,=0A=A0 =A0 = =A0 =A0started_at timestamp,=0A=A0 =A0 =A0 =A0ships_destroyed int,=0A=A0 = =A0 =A0 =A0energy_used float,=0A=A0 =A0 =A0 =A0alliance_involvement boolean= ,=0A=A0 =A0 =A0 =A0PRIMARY KEY (instigator,started_at,ships_destroyed)=0A= =A0 =A0);=0A/=0A=A0 =A0INSERT INTO altercations (instigator, started_at, sh= ips_destroyed,=0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0energy_used, alliance_involvement)=0A=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6, 'false');=0A***********= ***************************************************************************= *******************************=0A=0AIt works!=0A=0ABut if i create a colum= n family with compound primary key with 2 composite column as:=0A=0A*******= ***************************************************************************= ***********************************=0ACREATE TABLE altercations (=0A=A0 =A0= =A0 =A0instigator text,=0A=A0 =A0 =A0 =A0started_at timestamp,=0A=A0 =A0 = =A0 =A0ships_destroyed int,=0A=A0 =A0 =A0 =A0energy_used float,=0A=A0 =A0 = =A0 =A0alliance_involvement boolean,=0A=A0 =A0 =A0 =A0PRIMARY KEY (instigat= or,started_at)=0A=A0 =A0);=0A=0A*******************************************= **************************************************************************= =0Aand Then drop this column family:=A0=0A=0A******************************= ***************************************************************************= ************=0Adrop columnfamily altercations;=0A**************************= ***************************************************************************= ****************=0A=0Aand then try to create same one with primary compound= key with 3 composite column:=0A=0A****************************************= ***************************************************************************= **=0A=0ACREATE TABLE altercations (=0A=A0 =A0 =A0 =A0instigator text,=0A=A0= =A0 =A0 =A0started_at timestamp,=0A=A0 =A0 =A0 =A0ships_destroyed int,=0A= =A0 =A0 =A0 =A0energy_used float,=0A=A0 =A0 =A0 =A0alliance_involvement boo= lean,=0A=A0 =A0 =A0 =A0PRIMARY KEY (instigator,started_at,ships_destroyed)= =0A=A0 =A0);=0A************************************************************= *********************************************************=0A=0Ait gives me = error: "TSocket read 0 bytes"=0A=0ARest, as no column family is created, so= nothing onwards will work.=0A=0AIs this an issue?=0A=0A-Vivek=0A=0A=0A____= ____________________________=0A From: Jonathan Ellis =0A= To: dev@cassandra.apache.org; Vivek Mishra =0ASent= : Tuesday, October 9, 2012 9:08 AM=0ASubject: Re: Compund/Composite column = names=0A =0AWorks for me on latest 1.1 in cql3 mode.=A0 cql2 mode gives a p= arse error.=0A=0AOn Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra wrote:=0A> Hi All,=0A>=0A> I am trying to use compound primary = key column name and i am referring to:=0A> http://www.datastax.com/dev/blog= /whats-new-in-cql-3-0=0A>=0A>=0A> As mentioned on this example, i tried to = create a column family containing compound primary key (one or more) as:=0A= >=0A>=A0 CREATE TABLE altercations (=0A>=A0 =A0 =A0 =A0 instigator text,=0A= >=A0 =A0 =A0 =A0 started_at timestamp,=0A>=A0 =A0 =A0 =A0 ships_destroyed i= nt,=0A>=A0 =A0 =A0 =A0 energy_used float,=0A>=A0 =A0 =A0 =A0 alliance_invol= vement boolean,=0A>=A0 =A0 =A0 =A0 PRIMARY KEY (instigator,started_at,ships= _destroyed)=0A>=A0 =A0 );=0A>=0A> And i am getting:=0A>=0A>=0A> ***********= ***********************************************************=0A> TSocket rea= d 0 bytes=0A> cqlsh:testcomp>=0A> *****************************************= *****************************=0A>=0A>=0A> Then followed by insert and selec= t statements giving me following errors:=0A>=0A> **************************= ***************************************************************************= ***************************************=0A>=0A> cqlsh:testcomp>=A0 =A0 INSE= RT INTO altercations (instigator, started_at, ships_destroyed,=0A>=A0 =A0 = =A0 =A0 =A0 =A0 ...=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 energy_used, alliance_involvement)=0A>=A0 =A0 =A0 =A0 =A0 =A0 ...=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 VALUES ('Jayne Cobb', '2012-07-23',= 2, 4.6, 'false');=0A> TSocket read 0 bytes=0A>=0A> cqlsh:testcomp> select = * from altercations;=0A> Traceback (most recent call last):=0A>=A0 File "b= in/cqlsh", line 1008, in perform_statement=0A>=A0 =A0 self.cursor.execute(= statement, decoder=3Ddecoder)=0A>=A0 File "bin/../lib/cql-internal-only-1.= 0.10.zip/cql-1.0.10/cql/cursor.py", line 117, in execute=0A>=A0 =A0 respon= se =3D self.handle_cql_execution_errors(doquery, prepared_q, compress)=0A>= =A0 File "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cursor.py= ", line 132, in handle_cql_execution_errors=0A>=A0 =A0 return executor(*ar= gs, **kwargs)=0A>=A0 File "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0= .10/cql/cassandra/Cassandra.py", line 1583, in execute_cql_query=0A>=A0 =A0= self.send_execute_cql_query(query, compression)=0A>=A0 File "bin/../lib/= cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cassandra/Cassandra.py", line 1= 593, in send_execute_cql_query=0A>=A0 =A0 self._oprot.trans.flush()=0A>=A0= File "bin/../lib/thrift-python-internal-only-0.7.0.zip/thrift/transport/T= Transport.py", line 293, in flush=0A>=A0 =A0 self.__trans.write(buf)=0A>= =A0 File "bin/../lib/thrift-python-internal-only-0.7.0.zip/thrift/transpor= t/TSocket.py", line 117, in write=0A>=A0 =A0 plus =3D self.handle.send(buf= f)=0A> error: [Errno 32] Broken pipe=0A>=0A> cqlsh:testcomp>=0A>=0A> ******= ***************************************************************************= ***********************************************************=0A>=0A>=0A>=0A>= Any idea?=0A>=0A>=0A> -Vivek=0A=0A=0A=0A-- =0AJonathan Ellis=0AProject Cha= ir, Apache Cassandra=0Aco-founder of DataStax, the source for professional = Cassandra support=0Ahttp://www.datastax.com ---981468583-548293300-1349765897=:29752--