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 CB4AED703 for ; Tue, 9 Oct 2012 13:39:54 +0000 (UTC) Received: (qmail 82343 invoked by uid 500); 9 Oct 2012 13:39:53 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 82274 invoked by uid 500); 9 Oct 2012 13:39:53 -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 82260 invoked by uid 99); 9 Oct 2012 13:39:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2012 13:39:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbellis@gmail.com designates 209.85.160.44 as permitted sender) Received: from [209.85.160.44] (HELO mail-pb0-f44.google.com) (209.85.160.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2012 13:39:48 +0000 Received: by mail-pb0-f44.google.com with SMTP id ro8so5299252pbb.31 for ; Tue, 09 Oct 2012 06:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=CS2W03gwHinsPgyHHuf0HOvdQtR28mJ/RyBrOD/u4aM=; b=DGTBFmsYOvBpQE40a+8cNI46OaFrM9I+d1OlJqT1sy4bVaMXNTA+j8tRB2Ph33lxw3 NYrN8ITp9P3tvwsuYVCyTNvt2aDRIfjw00nc4gy7MYqVROr2z6qK0ZrL44ua6BT+H3X4 YE6juLEHz8XbmdSeMbDVoSe0AmkpZUwYBdDycHmQr7hK9eM/8Fe0kAPQPmYBwT9dQlzS v1qi85IF4rZl2IyU5sUXIJIXt6wxSiIo3ctsHawi86lfll5jxt7NG9B5qxRNjbWc3xfY LmkE9t6aPf1bO0wM8S/ECslcKLHENfJ2dxuNOf/UOlWiHezdZADClP17G8ZSH067/UfO I8cQ== Received: by 10.66.78.136 with SMTP id b8mr52710511pax.26.1349789968030; Tue, 09 Oct 2012 06:39:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.251.131 with HTTP; Tue, 9 Oct 2012 06:39:07 -0700 (PDT) In-Reply-To: <1349765897.29752.YahooMailNeo@web32505.mail.mud.yahoo.com> References: <1349749102.77304.YahooMailNeo@web32504.mail.mud.yahoo.com> <1349765897.29752.YahooMailNeo@web32505.mail.mud.yahoo.com> From: Jonathan Ellis Date: Tue, 9 Oct 2012 08:39:07 -0500 Message-ID: Subject: Re: Compund/Composite column names To: dev , Vivek Mishra Content-Type: multipart/alternative; boundary=f46d042f9e3c90dc4e04cba07784 X-Virus-Checked: Checked by ClamAV on apache.org --f46d042f9e3c90dc4e04cba07784 Content-Type: text/plain; charset=ISO-8859-1 Sounds like you're running into the keyspace drop bug. It's "mostly" fixed in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be released soon with the final fix. On Oct 9, 2012 1:58 AM, "Vivek Mishra" wrote: > > > Ok. I am able to understand the problem now. Issue is: > > If i create a column family altercations as: > > > **********************************************************************************************************8 > CREATE TABLE altercations ( > instigator text, > started_at timestamp, > ships_destroyed int, > energy_used float, > alliance_involvement boolean, > PRIMARY KEY (instigator,started_at,ships_destroyed) > ); > / > INSERT INTO altercations (instigator, started_at, ships_destroyed, > energy_used, alliance_involvement) > VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6, 'false'); > > ********************************************************************************************************************* > > It works! > > But if i create a column family with compound primary key with 2 composite > column as: > > > ********************************************************************************************************************* > CREATE TABLE altercations ( > instigator text, > started_at timestamp, > ships_destroyed int, > energy_used float, > alliance_involvement boolean, > PRIMARY KEY (instigator,started_at) > ); > > > ********************************************************************************************************************* > and Then drop this column family: > > > ********************************************************************************************************************* > drop columnfamily altercations; > > ********************************************************************************************************************* > > and then try to create same one with primary compound key with 3 composite > column: > > > ********************************************************************************************************************* > > CREATE TABLE altercations ( > instigator text, > started_at timestamp, > ships_destroyed int, > energy_used float, > alliance_involvement boolean, > PRIMARY KEY (instigator,started_at,ships_destroyed) > ); > > ********************************************************************************************************************* > > it gives me error: "TSocket read 0 bytes" > > Rest, as no column family is created, so nothing onwards will work. > > Is this an issue? > > -Vivek > > > ________________________________ > From: Jonathan Ellis > To: dev@cassandra.apache.org; Vivek Mishra > Sent: Tuesday, October 9, 2012 9:08 AM > Subject: Re: Compund/Composite column names > > Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error. > > On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra > wrote: > > Hi All, > > > > I am trying to use compound primary key column name and i am referring > to: > > http://www.datastax.com/dev/blog/whats-new-in-cql-3-0 > > > > > > As mentioned on this example, i tried to create a column family > containing compound primary key (one or more) as: > > > > CREATE TABLE altercations ( > > instigator text, > > started_at timestamp, > > ships_destroyed int, > > energy_used float, > > alliance_involvement boolean, > > PRIMARY KEY (instigator,started_at,ships_destroyed) > > ); > > > > And i am getting: > > > > > > ********************************************************************** > > TSocket read 0 bytes > > cqlsh:testcomp> > > ********************************************************************** > > > > > > Then followed by insert and select statements giving me following errors: > > > > > ******************************************************************************************************************************************** > > > > cqlsh:testcomp> INSERT INTO altercations (instigator, started_at, > ships_destroyed, > > ... energy_used, > alliance_involvement) > > ... VALUES ('Jayne Cobb', '2012-07-23', > 2, 4.6, 'false'); > > TSocket read 0 bytes > > > > cqlsh:testcomp> select * from altercations; > > Traceback (most recent call last): > > File "bin/cqlsh", line 1008, in perform_statement > > self.cursor.execute(statement, decoder=decoder) > > File > "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cursor.py", line > 117, in execute > > response = self.handle_cql_execution_errors(doquery, prepared_q, > compress) > > File > "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cursor.py", line > 132, in handle_cql_execution_errors > > return executor(*args, **kwargs) > > File > "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cassandra/Cassandra.py", > line 1583, in execute_cql_query > > self.send_execute_cql_query(query, compression) > > File > "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cassandra/Cassandra.py", > line 1593, in send_execute_cql_query > > self._oprot.trans.flush() > > File > "bin/../lib/thrift-python-internal-only-0.7.0.zip/thrift/transport/TTransport.py", > line 293, in flush > > self.__trans.write(buf) > > File > "bin/../lib/thrift-python-internal-only-0.7.0.zip/thrift/transport/TSocket.py", > line 117, in write > > plus = self.handle.send(buff) > > error: [Errno 32] Broken pipe > > > > cqlsh:testcomp> > > > > > ******************************************************************************************************************************************** > > > > > > > > Any idea? > > > > > > -Vivek > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com --f46d042f9e3c90dc4e04cba07784--