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 13A13D190 for ; Tue, 9 Oct 2012 08:44:31 +0000 (UTC) Received: (qmail 97935 invoked by uid 500); 9 Oct 2012 08:44:28 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 97876 invoked by uid 500); 9 Oct 2012 08:44:28 -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 97861 invoked by uid 99); 9 Oct 2012 08:44:28 -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 08:44:28 +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 mishra.vivs@gmail.com designates 209.85.220.44 as permitted sender) Received: from [209.85.220.44] (HELO mail-pa0-f44.google.com) (209.85.220.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2012 08:44:23 +0000 Received: by mail-pa0-f44.google.com with SMTP id fb11so4938666pad.31 for ; Tue, 09 Oct 2012 01:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xLzeQzsYONhQXl6EOu0BBopQpNruMz0YU7Gj/2oyWHc=; b=dJnQZeZLuhM4fQ842aZahbFuJQafDn/rzvV317H4Mp0JMwsQTNqb/uU/MQWs2Aynn3 L/wynd8kueegZokJF7IM6mwON73Jf/qtEEOWyMV9QaCr+aBIZ2S1y5b8TzlSFNZsV7LF +gQ/qhw59FM+jla+vhlHHNS2x3P/3fCl56yhn5AeEHUTM66LPQ2isA9p2NKzVw/3INSA gca6LiSShTjRyCtUQHGdlc2ojD7dzVEainoAEAEMaNr8irSp60XzYo21Z/F8987ORjw4 tof1lSRlIKM1cmkjIayxsHeG9prsKYoAIciJCQrqixKhSjyX6gmKVtNcVQYhMMtXzAwJ GFXw== MIME-Version: 1.0 Received: by 10.68.200.227 with SMTP id jv3mr61083251pbc.162.1349772242817; Tue, 09 Oct 2012 01:44:02 -0700 (PDT) Received: by 10.66.10.71 with HTTP; Tue, 9 Oct 2012 01:44:02 -0700 (PDT) In-Reply-To: References: <17C39FE466076C46B6E83F129C7B19CE16B8B5B5@HKXPRD0310MB352.apcprd03.prod.outlook.com> Date: Tue, 9 Oct 2012 14:14:02 +0530 Message-ID: Subject: Re: Using compound primary key From: Vivek Mishra To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7b15af190f91b904cb9c5744 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b15af190f91b904cb9c5744 Content-Type: text/plain; charset=ISO-8859-1 Works fine with 1.1.5 Thanks, -Vivek On Tue, Oct 9, 2012 at 1:59 PM, Vivek Mishra wrote: > I am going to try it on 1.1.5 > > In case if you can point me to changes made in between since 1.1.2 to > 1.1.5 . It will be great. > > -Vivek > > > On Tue, Oct 9, 2012 at 1:51 PM, Sylvain Lebresne wrote: > >> On Tue, Oct 9, 2012 at 9:50 AM, Vivek Mishra >> wrote: >> > Unfortunately nothing in server logs leads me to any error. >> >> Ok. Would you mind checking if you can reproduce against 1.1.5 if you >> haven't already. If it does, do you mind opening a JIRA ticket with >> the steps to reproduce? >> >> Thanks, >> Sylvain >> >> > >> > -Vivek >> > >> > >> > On Tue, Oct 9, 2012 at 1:16 PM, Sylvain Lebresne >> > wrote: >> >> >> >> On Tue, Oct 9, 2012 at 8:57 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? >> >> >> >> Sounds like it yes (I mean the theory is, you shouldn't ever get such >> >> an error by creating and dropping tables. Even if you do something >> >> wrong, you should get a meaningful error). >> >> >> >> Is there an exception in the log server side? (it's often the case >> >> with a "TSocket read 0 bytes"). >> >> >> >> -- >> >> Sylvain >> > >> > >> > > --047d7b15af190f91b904cb9c5744 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Works fine with 1.1.5

Thanks,
-Vivek

On Tue, Oct 9, 2012 at 1:59 PM, Vivek Mishra <mishra.vivs@gmail.com> wrote:
I am going to try it on 1.1.5

=
In case if you can point me to changes made in between since 1.1.2 to = 1.1.5 . It will be great.

-Vivek


On Tue, Oct 9, 2012= at 1:51 PM, Sylvain Lebresne <sylvain@datastax.com> wrot= e:
On Tue, Oct 9, 2012 at 9:50 AM, Vivek M= ishra <mishra= .vivs@gmail.com> wrote:
> Unfortunately nothing in server logs leads me to any error.

Ok. Would you mind checking if you can reproduce against 1.1.5 if you=
haven't already. If it does, do you mind opening a JIRA ticket with
the steps to reproduce?

Thanks,
Sylvain

>
> -Vivek
>
>
> On Tue, Oct 9, 2012 at 1:16 PM, Sylvain Lebresne <sylvain@datastax.com>
> wrote:
>>
>> On Tue, Oct 9, 2012 at 8:57 AM, Vivek Mishra <mishra.vivs@gmail.com>
>> wrote:
>> > Ok. I am able to understand the problem now. Issue is:
>> >
>> > If i create a column family altercations as:
>> >
>> >
>> > *************************************************************= *********************************************8
>> > CREATE TABLE altercations (
>> > =A0 =A0 =A0 =A0instigator text,
>> > =A0 =A0 =A0 =A0started_at timestamp,
>> > =A0 =A0 =A0 =A0ships_destroyed int,
>> > =A0 =A0 =A0 =A0energy_used float,
>> > =A0 =A0 =A0 =A0alliance_involvement boolean,
>> > =A0 =A0 =A0 =A0PRIMARY KEY (instigator,started_at,ships_destr= oyed)
>> > =A0 =A0);
>> > /
>> > =A0 =A0INSERT INTO altercations (instigator, started_at, ship= s_destroyed,
>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0en= ergy_used, alliance_involvement)
>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0VALUES ('Jayne= Cobb', '2012-07-23', 2, 4.6,
>> > 'false');
>> >
>> > *************************************************************= ********************************************************
>> >
>> > it works!
>> >
>> > But if i create a column family with compound primary key wit= h 2
>> > composite
>> > column as:
>> >
>> > CREATE TABLE altercations (
>> > =A0 =A0 =A0 =A0instigator text,
>> > =A0 =A0 =A0 =A0started_at timestamp,
>> > =A0 =A0 =A0 =A0ships_destroyed int,
>> > =A0 =A0 =A0 =A0energy_used float,
>> > =A0 =A0 =A0 =A0alliance_involvement boolean,
>> > =A0 =A0 =A0 =A0PRIMARY KEY (instigator,started_at)
>> > =A0 =A0);
>> >
>> >
>> > *************************************************************= ********************************************************
>> > and Then drop this column family:
>> >
>> > drop columnfamily altercations;
>> >
>> > and then try to create same one with primary compound key wit= h 3
>> > composite
>> > column:
>> >
>> > CREATE TABLE altercations (
>> > =A0 =A0 =A0 =A0instigator text,
>> > =A0 =A0 =A0 =A0started_at timestamp,
>> > =A0 =A0 =A0 =A0ships_destroyed int,
>> > =A0 =A0 =A0 =A0energy_used float,
>> > =A0 =A0 =A0 =A0alliance_involvement boolean,
>> > =A0 =A0 =A0 =A0PRIMARY KEY (instigator,started_at,ships_destr= oyed)
>> > =A0 =A0);
>> >
>> > it gives me error: "TSocket read 0 bytes"
>> >
>> > Rest, as no column family is created, so nothing onwards will= work.
>> >
>> > Is this an issue?
>>
>> Sounds like it yes (I mean the theory is, you shouldn't ever g= et such
>> an error by creating and dropping tables. Even if you do something=
>> wrong, you should get a meaningful error).
>>
>> Is there an exception in the log server side? (it's often the = case
>> with a "TSocket read 0 bytes").
>>
>> --
>> Sylvain
>
>


--047d7b15af190f91b904cb9c5744--