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 ADB6AB831 for ; Wed, 4 Jan 2012 13:34:10 +0000 (UTC) Received: (qmail 62577 invoked by uid 500); 4 Jan 2012 13:34:08 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 62332 invoked by uid 500); 4 Jan 2012 13:34:06 -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 62324 invoked by uid 99); 4 Jan 2012 13:34:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2012 13:34:06 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Stephen.Pope@quest.com designates 12.106.87.94 as permitted sender) Received: from [12.106.87.94] (HELO alvetxw02.quest.com) (12.106.87.94) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2012 13:33:59 +0000 Received: from ALVHTXW01.prod.quest.corp (10.1.135.17) by alvetxw02.quest.com (10.1.100.94) with Microsoft SMTP Server (TLS) id 14.1.255.0; Wed, 4 Jan 2012 05:22:40 -0800 Received: from ALVMBXW01.prod.quest.corp ([fe80::48dd:e065:86b3:9cee]) by ALVHTXW01.prod.quest.corp ([::1]) with mapi id 14.01.0255.000; Wed, 4 Jan 2012 05:33:37 -0800 From: Stephen Pope To: "user@cassandra.apache.org" Subject: RE: Replacing supercolumns with composite columns; Getting the equivalent of retrieving a list of supercolumns by name Thread-Topic: Replacing supercolumns with composite columns; Getting the equivalent of retrieving a list of supercolumns by name Thread-Index: AQHMylIXxhPXs3RNWU+UsufWRdMTIJX7mVOA//+f3BCAAPmVAIAAAs9Q Date: Wed, 4 Jan 2012 13:33:36 +0000 Message-ID: <654A67E918314D418D96AC894A5B0F0D105C3A@ALVMBXW01.prod.quest.corp> References: <4F036107.1040600@morningstar.com> <654A67E918314D418D96AC894A5B0F0D105960@ALVMBXW01.prod.quest.corp> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.4.60.53] Content-Type: multipart/alternative; boundary="_000_654A67E918314D418D96AC894A5B0F0D105C3AALVMBXW01prodques_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_654A67E918314D418D96AC894A5B0F0D105C3AALVMBXW01prodques_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I don't think I can tell my exact column names in many cases. For example m= ost of our queries are for specific keys, and an unknown range of numbers (= like key1, key where number > 10000). How can I set up my slice in this cas= e to retrieve only the columns that match both criteria? Cheers, Steve From: rajkumar.w93@gmail.com [mailto:rajkumar.w93@gmail.com] On Behalf Of A= sil Klin Sent: Wednesday, January 04, 2012 12:21 AM To: user@cassandra.apache.org Subject: Re: Replacing supercolumns with composite columns; Getting the equ= ivalent of retrieving a list of supercolumns by name @Stephan: in that case, you can easily tell the names of all columns you wa= nt to retrieve, so you can make a query to retrieve those list of composite= columns. @Jeremiah, So where is my best bet ? Should I leave the supercolumns as it is as of no= w, since I can find a good way to use them incase I replace them with compo= site columns? On Wed, Jan 4, 2012 at 4:01 AM, Stephen Pope > wrote: The bonus you're talking about here, how do I apply that? For example, my columns are in the form of number.id suc= h as 4.steve, 4.greg, 5.steve, 5.george. Is there a way to query a slice of= numbers with a list of ids? As in, I want all the columns with numbers bet= ween 4 and 10 which have ids steve or greg. Cheers, Steve -----Original Message----- From: Jeremiah Jordan [mailto:jeremiah.jordan@morningstar.com] Sent: Tuesday, January 03, 2012 3:12 PM To: user@cassandra.apache.org Cc: Asil Klin Subject: Re: Replacing supercolumns with composite columns; Getting the equ= ivalent of retrieving a list of supercolumns by name The main issue with replacing super columns with composite columns right no= w is that if you don't know all your sub-column names you can't select mult= iple "super columns" worth of data in the same query without getting extra = stuff. You have to use a slice to get all subcolumns of a given super colu= mn, and you can't have disjoint slices, so if you want two super columns fu= ll, you have to get all the other stuff that is in between them, or make tw= o queries. If you know what all of the sub-column names are you can ask for all of the= super/sub column pairs for all of the super columns you want and not get e= xtra data. If you don't need to pull multiple super columns at a time with slices like= that, then there isn't really an issue. A bonus of using composite keys like this, is that if there is a specific s= ub column you want from multiple super columns, you can pull all those out = with a single multiget and you don't have to pull the rest of the columns..= . So there are pros and cons... -Jeremiah On 01/03/2012 01:58 PM, Asil Klin wrote: > I have a super columns family which I always use to retrieve a list of > supercolumns(with all subcolumns) by name. I am looking forward to > replace all SuperColumns in my schema with the composite columns. > > How could I design schema so that I could do the equivalent of > retrieving a list of supercolumns by name, in case of using composite > columns. > > (As of now I thought of using the supercolumn name as the first > component of the composite name and the subcolumn name as 2nd > component of composite name.) --_000_654A67E918314D418D96AC894A5B0F0D105C3AALVMBXW01prodques_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I don’t think I can= tell my exact column names in many cases. For example most of our queries = are for specific keys, and an unknown range of numbers (like key1, key where number > 10000). How can I set up my slice in this case to re= trieve only the columns that match both criteria?

 <= /p>

Cheers,=

Steve

 <= /p>

From: rajkumar= .w93@gmail.com [mailto:rajkumar.w93@gmail.com] On Behalf Of Asil Klin
Sent: Wednesday, January 04, 2012 12:21 AM
To: user@cassandra.apache.org
Subject: Re: Replacing supercolumns with composite columns; Getting = the equivalent of retrieving a list of supercolumns by name

 

@Stephan: in that case, you can easily tell the name= s of all columns you want to retrieve, so you can make a query to retrieve = those list of composite columns.

 

 

@Jeremiah,

So where is my best bet ? Should I leave the superco= lumns as it is as of now, since I can find a good way to use them incase I = replace them with composite columns?

 

 

On Wed, Jan 4, 2012 at 4:01 AM, Stephen Pope <Stephen.Pope@quest.com> wrote= :

 The bonus you're talking about here, how do I = apply that?

 For example, my columns are in the form of number.id such as 4.steve, 4.greg, 5.steve, 5.george. Is there a way to= query a slice of numbers with a list of ids? As in, I want all the columns= with numbers between 4 and 10 which have ids steve or greg.

 Cheers,
 Steve


-----Original Message-----
From: Jeremiah Jordan [mailto:jeremiah.jordan@morningstar.com]
Sent: Tuesday, January 03, 2012 3:12 PM
To: user@cassandra.apache.org<= /a>
Cc: Asil Klin
Subject: Re: Replacing supercolumns with composite columns; Getting the equ= ivalent of retrieving a list of supercolumns by name

The main issue with replacing super columns with composite columns right no= w is that if you don't know all your sub-column names you can't select mult= iple "super columns" worth of data in the same query without gett= ing extra stuff.  You have to use a slice to get all subcolumns of a given super column, and you can't have disjoint= slices, so if you want two super columns full, you have to get all the oth= er stuff that is in between them, or make two queries.
If you know what all of the sub-column names are you can ask for all of the= super/sub column pairs for all of the super columns you want and not get e= xtra data.

If you don't need to pull multiple super columns at a time with slices like= that, then there isn't really an issue.

A bonus of using composite keys like this, is that if there is a specific s= ub column you want from multiple super columns, you can pull all those out = with a single multiget and you don't have to pull the rest of the columns..= .

So there are pros and cons...

-Jeremiah


On 01/03/2012 01:58 PM, Asil Klin wrote:
> I have a super columns family which I always use to retrieve a list of=
> supercolumns(with all subcolumns) by name. I am looking forward to
> replace all SuperColumns in my schema with the composite columns.
>
> How could I design schema so that I could do the equivalent of
> retrieving a list of supercolumns by name, in case of using composite<= br> > columns.
>
> (As of now I thought of using the supercolumn name as the first
> component of the composite name and the subcolumn name as 2nd
> component of composite name.)

 

--_000_654A67E918314D418D96AC894A5B0F0D105C3AALVMBXW01prodques_--