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 53056620D for ; Thu, 30 Jun 2011 10:23:26 +0000 (UTC) Received: (qmail 44501 invoked by uid 500); 30 Jun 2011 10:23:23 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 43599 invoked by uid 500); 30 Jun 2011 10:23: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 43591 invoked by uid 99); 30 Jun 2011 10:23:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2011 10:23:12 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [217.146.183.115] (HELO nm20-vm0.bullet.mail.ukl.yahoo.com) (217.146.183.115) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 30 Jun 2011 10:23:05 +0000 Received: from [217.146.183.209] by nm20.bullet.mail.ukl.yahoo.com with NNFMP; 30 Jun 2011 10:22:44 -0000 Received: from [217.146.183.161] by tm2.bullet.mail.ukl.yahoo.com with NNFMP; 30 Jun 2011 10:22:44 -0000 Received: from [127.0.0.1] by omp1002.mail.ukl.yahoo.com with NNFMP; 30 Jun 2011 10:22:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 794974.90761.bm@omp1002.mail.ukl.yahoo.com Received: (qmail 41728 invoked by uid 60001); 30 Jun 2011 10:22:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s1024; t=1309429364; bh=tavrBaVW+PxyIjt2fjjyItWapyN7JSgWXwX4yTFYiUY=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=UkXqr9tmZvaR79fdQUmP9Yzcv52AdjkH/U36vvTYc+XvWBexml6xTLjyXmsS9Xa+Jm5JJldhYrPrCTAOTKDvNZjAqeUABp9qoNpm0fM6u761c5Bwl6QGS8HxekCJXzGS7i1AmL219DSsjbF9qrYZHANAOQ4xCWpHpdfsKi9M3og= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=B89wM7HiOCTcbVnE9aJQH0YHyWqqHySEuByImSFjkMEfhaiLA+W/OF74Cy01xp+HmVhXbedELW7dl5CFRZufnvF/sbsXi5D4B0p1tOXic7pv5G/+PcHK9JGJr2Se9MzgvLyWxvBxk3/5+KSi6qnwkovTd1rg39vJZzVLmziSTIU=; X-YMail-OSG: _8JFb2AVM1l85FNT3dvzf2_4zLvRH.0_0WBXYFL8Q9TJZwA sCpM1uxMRZ_iCgsydVr6KjIofsb6XEW7Sj6Q5ue8OyMu9DELNFRco9dnw17N 4Dj2qVnwyrPSceDbQvXopv.WILkdj0tQtbjRNt9GXnglAf8IU36DUn47xV9d GTY_hFr.KTP1Q7LArGXf5bSoY4GDiRJjpvWjFM5_RlZiUgHljmMWcyVkKBdL K8PUpUYzfPm8AD1dnrwmtTrMqus85FzUvuPVRaD.266hqJfEmiQcRbVxzvdb h._TfnKVRmRGRmGTC7SdfJGJGIyn2KGIEfatd8oITy9rnYEIIKZ9KioDfmyR IfEbjOATe0zn.pBqPOQZiFmYNLh7uwmnmkv2ASxn4zji5xZVykteuNzyOXF0 zsBxERaz5U43HoV.TwKJdDxV84qc2.0xRrL6ZkV1W1yr54pwTZWX56pCXLV4 5fzKyoq3X9wEYd0MpZVsRI1ux__rCzU2Ev_TQmCtoqBb.huj4Pb16hEPbxr8 HioqZT4pQAjMmKIBmzMVdKehIYNxOuxn7HMbzKh5wec7k9.JAiZh7XwHh5xJ .AkehnfpqBFj5z2Nu8z01qM8- Received: from [64.208.49.20] by web28611.mail.ukl.yahoo.com via HTTP; Thu, 30 Jun 2011 11:22:44 BST X-Mailer: YahooMailWebService/0.8.112.307740 References: <92676.91158.qm@web28605.mail.ukl.yahoo.com> <13F95955-6243-4A51-A484-C592BE24C315@thelastpickle.com> <729574.43492.qm@web28606.mail.ukl.yahoo.com> <967121.4020.qm@web28610.mail.ukl.yahoo.com> <1309256444.90809.YahooMailNeo@web28607.mail.ukl.yahoo.com> <0D63BB28-4341-4A14-98D4-97391DCE6D55@thelastpickle.com> Message-ID: <1309429364.40228.YahooMailNeo@web28611.mail.ukl.yahoo.com> Date: Thu, 30 Jun 2011 11:22:44 +0100 (BST) From: karim abbouh Reply-To: karim abbouh Subject: Re : Re : Re : get_range_slices result To: "user@cassandra.apache.org" In-Reply-To: <0D63BB28-4341-4A14-98D4-97391DCE6D55@thelastpickle.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1693220888-1309429364=:40228" X-Virus-Checked: Checked by ClamAV on apache.org --0-1693220888-1309429364=:40228 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable what i want is that i get the records in the same order wich they were inse= rted.=0Ahow can i get this using any type of comparator type=0Aif there is = a code java for this it can be useful.=0A=0A=0A=0A_________________________= _______=0ADe=A0: aaron morton =0A=C0=A0: user@cass= andra.apache.org=0AEnvoy=E9 le : Mardi 28 Juin 2011 12h40=0AObjet=A0: Re: R= e : Re : get_range_slices result=0A=0A=0AFirst thing is you really should u= pgrade from 0.6, the current release is 0.8.=A0=0A=0AInfo on time uuid's=0A= http://wiki.apache.org/cassandra/FAQ#working_with_timeuuid_in_java=0A=0AIf = you are using a higher level client like Hector or Pelops it will take care= of encoding for you.=A0=0A=0ACheers=0A=0A=0A-----------------=0AAaron Mort= on=0AFreelance Cassandra Developer=0A@aaronmorton=0Ahttp://www.thelastpickl= e.com =0A=0AOn 28 Jun 2011, at 22:20, karim abbouh wrote:=0A=0Acan i have a= n example for using=A0=A0=A0 TimeUUIDType=A0=A0 as comparator=A0in a client= =A0 java code.=0A>=0A>=0A>=0A>=0A>________________________________=0A>De=A0= : karim abbouh =0A>=C0=A0: "user@cassandra.apache.org" = =0A>Envoy=E9 le : Lundi 27 Juin 2011 17h59=0A>Ob= jet=A0: Re : Re : get_range_slices result=0A>=0A>=0A>i used TimeUUIDType as= type in storage-conf.xml file=0A>=0A>=A0=0A>=0A>=0A>and i used it as comparator in my jav= a code,=0A>but in the execution i get exception : =0A>=0A>Erreur --java.io.= UnsupportedEncodingException: TimeUUIDType=0A>=0A>=0A>=0A>=0A>how can i wri= te it?=0A>=0A>=0A>BR=0A>=0A>=0A>=0A>=0A>________________________________=0A= >De=A0: David Boxenhorn =0A>=C0=A0: user@cassandra.apac= he.org=0A>Cc=A0: karim abbouh =0A>Envoy=E9 le : Vendred= i 24 Juin 2011 11h25=0A>Objet=A0: Re: Re : get_range_slices result=0A>=0A>Y= ou can get the best of both worlds by repeating the key in a column,=0A>and= creating a secondary index on that column.=0A>=0A>On Fri, Jun 24, 2011 at = 1:16 PM, Sylvain Lebresne wrote:=0A>> On Fri, Jun 24= , 2011 at 10:21 AM, karim abbouh wrote:=0A>>> i want g= et_range_slices() function returns records sorted(orded)=A0=0A by the=0A>>>= key(rowId) used during the insertion.=0A>>> is=0A it possible?=0A>>=0A>> Y= ou will have to use the OrderPreservingPartitioner. This is no=0A>> without= inconvenience however.=0A>> See for instance=0A>> http://wiki.apache.org/c= assandra/StorageConfiguration#line-100 or=0A>> http://ria101.wordpress.com/= 2010/02/22/cassandra-randompartitioner-vs-orderpreservingpartitioner/=0A>> = that give more details on the pros and cons (the short version being=0A>> t= hat the main advantage of=0A>> OrderPreservingPartitioner is what you're as= king for, but it's main=0A>> drawback is that load-balancing=0A>> the clust= er will likely be very very hard).=0A>>=0A>> In general the advice is to st= ick with RandomPartitioner and design a=0A>> data=0A model that avoids=0A n= eeding=0A>> range slices (or at least needing that the result is sorted). T= his is=0A>> very often not too hard and more=0A>> efficient, and much more = simpler than to deal with the load balancing=0A>> problems of OrderPreservi= ngPartitioner.=0A>>=0A>> --=0A>> Sylvain=0A>>=0A>>>=0A>>> _________________= _______________=0A>>> De=A0: aaron morton =0A>>> = =C0=A0: user@cassandra.apache.org=0A>>> Envoy=E9 le : Jeudi 23 Juin 2011 20= h30=0A>>> Objet=A0: Re: get_range_slices result=0A>>>=0A>>> Not sure what y= our question is.=0A>>> Does this help ?=A0http://wiki.apache.org/cassandra/= FAQ#range_rp=0A>>> Cheers=0A>>> -----------------=0A>>> Aaron Morton=0A>>> = Freelance Cassandra Developer=0A>>> @aaronmorton=0A>>> http://www.thelastpi= ckle.com=0A>>> On 23 Jun 2011, at 21:59, karim abbouh wrote:=0A>>>=0A>>> ho= w can get_range_slices() function returns sorting key ?=0A>>> BR=0A>>>=0A>>= >=0A>>>=0A>>>=0A>>=0A>=0A>=0A>=0A>=0A> --0-1693220888-1309429364=:40228 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
what i wan= t is that i get the records in the same order wich they were inserted.
how can i get this using any type of comparator type
if there is a code java for this it can be useful.



De : aaron morton <aaron@thelastpickle.com>=C0 : user@cassandra= .apache.org
Envoy=E9 le : Mardi 28 Juin 2011 12h40
Objet : Re: Re : Re : get_range_slices result

First thing is you really should upgrade = from 0.6, the current release is 0.8. 

Info on time= uuid's

If you are using a higher lev= el client like Hector or Pelops it will take care of encoding for you. = ;

Cheers

=0A
-----------------
Aaron Morton
Freelance Cassandra Developer
@aa= ronmorton
=0A
=0A=0A
On 28 Jun 2011, at 22:2= 0, karim abbouh wrote:

TimeUUIDType   as compa= rator  in a client&nbs= p; java code.


De : karim abbouh <karim_rbt@yah= oo.fr>
=C0 : "user@cassandra.apache.org" <user@cassandra.apache.org>
= Envoy=E9 le : Lundi 27 Juin= 2011 17h59
Objet := Re :=0A Re : get_range_slices result

i used TimeUUI= DType as type in storage-conf.xml file
 <ColumnFamily Name=3D"table" CompareWith=3D"Tim= eUUIDType "/>

and i used it as comparator in my= java code,
but in the execution i get exception :
Erreur --java.io.UnsupportedEncodingException: TimeUUIDType

=

how can i write it?

BR


De : David = Boxenhorn=0A <david@citypath.com= >
=C0 : user@cassandra.apache.orgCc : karim abbouh &l= t;karim_rbt@yahoo.fr>
Envoy=E9 le : Vendredi 24 Juin 201= 1 11h25
Objet : Re:= Re : get_range_slices result

You can get the best of both wo= rlds by repeating the key in a column,
and creating a secondary index on= that column.

On Fri, Jun 24, 2011 at 1:16 PM, Sylvain Lebresne <= sylvain@datastax.com> wrote:
> On Fri, Ju= n 24, 2011 at 10:21 AM, karim abbouh <karim_rbt@yahoo.fr> wrote:
>> i want get_range_slices() f= unction returns records sorted(orded) =0A by the
>> key(rowId= ) used during the insertion.
>> is=0A it possible?
>
>= You will have to use the OrderPreservingPartitioner. This is no
> wi= thout inconvenience however.
> See for instance
> http://wiki.apache.org/cassandra/StorageConfiguration= #line-100 or
> http://ria101.wordpress.com/2010/02/22/cassandra-random= partitioner-vs-orderpreservingpartitioner/
> that give more detai= ls on the pros and cons (the short version being
> that the main adva= ntage of
> OrderPreservingPartitioner is what you're asking for, but = it's main
> drawback is that load-balancing
> the cluster will = likely be very very hard).
>
> In general the advice is to stic= k with RandomPartitioner and design a
> data=0A model that avoids=0A = needing
> range slices (or at least needing that the result is sorted= ). This is
> very often not too hard and more
> efficient, and = much more simpler than to deal with the load balancing
> problems of = OrderPreservingPartitioner.
>
> --
> Sylvain
>
&= gt;>
>> ________________________________
>> De : = aaron morton <aaron@thelas= tpickle.com>
>> =C0 : user@cassandra.apache.org
>> Envoy=E9 le : J= eudi 23 Juin 2011 20h30
>> Objet : Re: get_range_slices resul= t
>>
>> Not sure what your question is.
>> Does = this help ? http://wiki.apache.= org/cassandra/FAQ#range_rp
>> Cheers
>> -------------= ----
>> Aaron Morton
>> Freelance Cassandra Developer
= >> @aaronmorton
>> http://www.thelastpickle.com
>= ;> On 23 Jun 2011, at 21:59, karim abbouh wrote:
>>
>>= how can get_range_slices() function returns sorting key ?
>> BR>>
>>
>>
>>
>







--0-1693220888-1309429364=:40228--