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 648767395 for ; Tue, 29 Nov 2011 06:55:50 +0000 (UTC) Received: (qmail 57389 invoked by uid 500); 29 Nov 2011 06:55:48 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 57349 invoked by uid 500); 29 Nov 2011 06:55:46 -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 57324 invoked by uid 99); 29 Nov 2011 06:55:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 06:55:43 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 132.72.42.23 is neither permitted nor denied by domain of lolitushka@gmail.com) Received: from [132.72.42.23] (HELO indigo.cs.bgu.ac.il) (132.72.42.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 06:55:36 +0000 Received: from [132.72.41.93] (lesbinux [132.72.41.93]) by indigo.cs.bgu.ac.il (8.13.6/8.13.6) with ESMTP id pAT6tIQl010301; Tue, 29 Nov 2011 08:55:18 +0200 (IST) Message-ID: <4ED481D5.5080105@gmail.com> Date: Tue, 29 Nov 2011 08:55:17 +0200 From: Piavlo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: user@cassandra.apache.org CC: Benoit Perroud Subject: Re: need help with choosing correct tokens for ByteOrderedPartitioner References: <4ECE148A.1070303@cs.bgu.ac.il> <4ED3AB7F.6000806@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------070001020205080004000009" X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on gandalf X-Old-Spam-Status: No, score=-1.8 required=6.5 tests=ALL_TRUSTED autolearn=no version=3.2.3 This is a multi-part message in MIME format. --------------070001020205080004000009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 11/29/2011 02:51 AM, Benoit Perroud wrote: > You may want to add 29991231 instead of appending. Do you mean generate keys like this md5(member_id) + yyyymmdd instead of md5(member_id)yyyymmdd And use the normal 128bit token range ? Hmm - this way there will obviously be overlaps of members ranges - then two md5(member_id1) & md5(member_id2) end up very close so using md5(member_id1)+yyyymmdd & md5(member_id2)+yyyymmdd will cause range overlaps with ByteOrderedPartitioner. Thanks Alex > > Le lundi 28 novembre 2011, Piavlo > a �crit : > > Anyone can help with this? > > > > Thanks > > > > On 11/24/2011 11:55 AM, Piavlo wrote: > >> > >> Hi, > >> > >> We need help with choosing correct tokens for ByteOrderedPartitioner > >> Originally the key where supposed to be member_id-yyyymmdd > >> but since we need to male rage scans on same member_id and varying > date ranges yyyymmdd > >> we decided to use ByteOrderedPartitioner, so we need that same > member will be assigned to same token range. > >> So we decided that the keys will be md5(member_id)yyyymmdd > >> Since md5 on member_id should give even distribution or member_id > across tokens. > >> > >> We have 4 nodes, and don't understand how to choose the tokens. > >> We tried the following tokens > >> > >> # ./tokengentool 4 > >> token 0: 0 > >> token 1: 42535295865117307932921825928971026432 > >> token 2: 85070591730234615865843651857942052864 > >> token 3: 127605887595351923798765477786913079296 > >> > >> and appended 29991231 > >> > >> so we ended up with the following tokens > >> > >> token 0: 0 > >> token 1: 4253529586511730793292182592897102643229991231 > >> token 2: 8507059173023461586584365185794205286429991231 > >> token 3: 12760588759535192379876547778691307929629991231 > >> > >> But the key end up not evenly distributed. > >> > >> So any help is appreciated. > >> > >> Thanks > >> Alex > > > > > > -- > sent from my Nokia 3210 --------------070001020205080004000009 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 11/29/2011 02:51 AM, Benoit Perroud wrote:
You may want to add 29991231 instead of appending.

Do you mean generate keys like this
md5(member_id) + yyyymmdd
instead of
md5(member_id)yyyymmdd
And use the normal 128bit token range ?

Hmm - this way there will obviously be overlaps of members ranges - then two md5(member_id1) & md5(member_id2) end up very close so
using md5(member_id1)+yyyymmdd & md5(member_id2)+yyyymmdd will cause range overlaps with ByteOrderedPartitioner.

Thanks
Alex


Le lundi 28 novembre 2011, Piavlo <lolitushka@gmail.com> a écrit :
> Anyone can help with this?
>
> Thanks
>
> On 11/24/2011 11:55 AM, Piavlo wrote:
>>
>>  Hi,
>>
>> We need help with choosing  correct tokens for ByteOrderedPartitioner
>> Originally the key where supposed to be member_id-yyyymmdd
>> but since we need to male rage scans on same member_id and varying date ranges yyyymmdd
>> we decided to use ByteOrderedPartitioner, so we need that same member will be assigned to same token range.
>> So we decided that the keys will be md5(member_id)yyyymmdd
>> Since md5 on member_id should give even distribution or member_id across tokens.
>>
>> We have 4 nodes, and don't understand how to choose the tokens.
>> We tried the following tokens
>>
>> # ./tokengentool 4
>> token 0: 0
>> token 1: 42535295865117307932921825928971026432
>> token 2: 85070591730234615865843651857942052864
>> token 3: 127605887595351923798765477786913079296
>>
>> and appended 29991231
>>
>> so we ended up with the following tokens
>>
>> token 0: 0
>> token 1: 4253529586511730793292182592897102643229991231
>> token 2: 8507059173023461586584365185794205286429991231
>> token 3: 12760588759535192379876547778691307929629991231
>>
>> But the key end up not evenly distributed.
>>
>> So any help is appreciated.
>>
>> Thanks
>> Alex
>
>

--
sent from my Nokia 3210

--------------070001020205080004000009--