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 BB16EF0C8 for ; Fri, 19 Apr 2013 02:25:17 +0000 (UTC) Received: (qmail 54529 invoked by uid 500); 19 Apr 2013 02:25:15 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 54389 invoked by uid 500); 19 Apr 2013 02:25:15 -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 54379 invoked by uid 99); 19 Apr 2013 02:25:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Apr 2013 02:25:15 +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 (nike.apache.org: domain of lccalicia@gmail.com designates 74.125.83.47 as permitted sender) Received: from [74.125.83.47] (HELO mail-ee0-f47.google.com) (74.125.83.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Apr 2013 02:25:09 +0000 Received: by mail-ee0-f47.google.com with SMTP id t10so1541875eei.20 for ; Thu, 18 Apr 2013 19:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=uh57CB6ywe3EUsf2oTuGmzs2sTAohX7bF+JaW5iuT6s=; b=BlT9Krh08ySXr3AYwO14MbaA4kZlTy1oKHatIsJGw3rRH7DeDWy7jMQS8iKXHyK/t7 ofXUeSa313DzOSsbmyLCisKfr6KJNkeyDfwtY+EsEQDxus3SiTip0pNZDAOu0wGEvsY5 P5rhfSfuiKbJ+CQM0bnsr+4N/ULzMo9NeCwSRaOQUtUcEnJ0JZi4vwAN7hF8IWZG43IO wfUbyVx9A2YkJZ+odoMFqUqi3knoJ6yNiEISnLCrI9vITP1dY54Qn3X3UNEQdR1pY7/S Bdr2tQ4nNFu2KzMQiP0haNO6KdHLsGUvG50ArQKY8mYXuXllJtPggXb5xwT84QDhiaay v4vQ== MIME-Version: 1.0 X-Received: by 10.14.149.141 with SMTP id x13mr36726010eej.31.1366338288867; Thu, 18 Apr 2013 19:24:48 -0700 (PDT) Received: by 10.223.94.73 with HTTP; Thu, 18 Apr 2013 19:24:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Apr 2013 10:24:48 +0800 Message-ID: Subject: Re: Key-Token mapping in cassandra From: Alicia Leong To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=089e0163449859fd2304daad6c1a X-Virus-Checked: Checked by ClamAV on apache.org --089e0163449859fd2304daad6c1a Content-Type: text/plain; charset=ISO-8859-1 Hi Ravi Key1 --> 123/IMAGE Key2 --> 123/DOCUMENTS Key3 --> 123/MULTIMEDIA Which one is your ROW KEY ?? It is Key1,Key2,Key3? On Thu, Apr 18, 2013 at 3:56 PM, aaron morton wrote: > All rows with the same key go on the same nodes. So if you use the same > row key in different CF's they will be on the same nodes. i.e. have CF's > called Image, Documents, Meta and store rows in all of them with the 123 > key. > > Cheers > > ----------------- > Aaron Morton > Freelance Cassandra Consultant > New Zealand > > @aaronmorton > http://www.thelastpickle.com > > On 18/04/2013, at 1:32 PM, Ravikumar Govindarajan < > ravikumar.govindarajan@gmail.com> wrote: > > Thanks Aaron. > We are looking at co-locating all keys for a given user in one Cassandra > node. > Are there any other ways to achieve this > > -- > Ravi > > On Thursday, April 18, 2013, aaron morton wrote: > >> CASSANDRA-1034 >> >> That ticket is about removing an assumption which was not correct. >> >> I would like all keys with "123" as prefix to be mapped to a single token. >> >> Why? >> it's not possible nor desirable IMHO. Tokens are used to identify a >> single row internally. >> >> Cheers >> >> ----------------- >> Aaron Morton >> Freelance Cassandra Consultant >> New Zealand >> >> @aaronmorton >> http://www.thelastpickle.com >> >> On 17/04/2013, at 11:25 PM, Ravikumar Govindarajan < >> ravikumar.govindarajan@gmail.com> wrote: >> >> We would like to map multiple keys to a single token in cassandra. I >> believe this should be possible now with CASSANDRA-1034 >> >> Ex: >> >> Key1 --> 123/IMAGE >> Key2 --> 123/DOCUMENTS >> Key3 --> 123/MULTIMEDIA >> >> I would like all keys with "123" as prefix to be mapped to a single token. >> >> Is this possible? What should be the Partitioner that I should most >> likely extend and write my own to achieve the desired result? >> >> -- >> Ravi >> >> >> > --089e0163449859fd2304daad6c1a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Ravi

Key1 --> 123/IMAGE
Key2 --> 123/DOCUMENTS
Key3 --> 123/MULTIMEDIA


Which one is your ROW KEY ?? =A0 It is Key1,Key2,Key3? =A0




On Thu, Apr 18, 2013 at 3:56 PM, aaron m= orton <aaron@thelastpickle.com> wrote:
All rows with the same key go on the sa= me nodes. So if you use the same row key in different CF's they will be= on the same nodes.=A0i.e. have CF's called Image, Documents, Meta and = store rows in all of them with the 123 key.=A0

Cheers

-----------------
Aaron Morton
Freelance Cassandra= Consultant
New Zealand


On 18/04/2013, at 1:32 PM, Ravik= umar Govindarajan <ravikumar.govindarajan@gmail.com> wrote:

<= blockquote type=3D"cite"> Thanks Aaron.
=A0We are looking at co-locating all keys fo= r a given user in one Cassandra node.
Are there any other ways to achiev= e this

--
Ravi

On Thursday, April = 18, 2013, aaron morton wrote:
CASSANDRA-1034
That ti= cket is about removing an assumption which was not correct.=A0

I would like all = keys with "123" as prefix to be mapped to a single token.
Why?=A0
it'= ;s not possible nor desirable IMHO. Tokens are used to identify a single ro= w internally.=A0
=A0
Cheers
-----------------
Aaron Morton
Freelance Cassandra= Consultant
New Zealand


On 17/04/2013, at 11:25 PM, Ravikumar Govindarajan <rav= ikumar.govindarajan@gmail.com> wrote:

We would like to map multipl= e keys to a single token in cassandra. I believe this should be possible no= w with=A0CASSANDRA-1034

Ex:

Key= 1 --> 123/IMAGE
Key2 --> 123/DOCUMENTS
Key3 --> 123/MULTIMEDIA

I would like all keys with "123" as prefix to b= e mapped to a single token.

Is this possible? What should be the Partitioner that I should m= ost likely extend and write my own to achieve the desired result?

--
Ravi



--089e0163449859fd2304daad6c1a--