Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 53164 invoked from network); 12 May 2010 23:43:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 May 2010 23:43:09 -0000 Received: (qmail 25823 invoked by uid 500); 12 May 2010 23:43:08 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 25795 invoked by uid 500); 12 May 2010 23:43:08 -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 25787 invoked by uid 99); 12 May 2010 23:43:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 23:43:08 +0000 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vijay2win@gmail.com designates 209.85.221.184 as permitted sender) Received: from [209.85.221.184] (HELO mail-qy0-f184.google.com) (209.85.221.184) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 23:43:04 +0000 Received: by qyk14 with SMTP id 14so471910qyk.17 for ; Wed, 12 May 2010 16:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=4W722DgSvQx4/ZfwoGzJDc55DjIDlZgQvv6Un/+Vrb4=; b=wFHS/RFdrE8kBPEPgaZ4T5j0+Ny4Cp6IJvbEbyw9pnf1g+b4AtQhH5VBLl/LlQi4x/ yctlWi0Xb7blbI94QiewPw+R/aVZ9IdEy8q8GwWdLLewSN8v/J5eBxxRmMt4/QvTYRfQ AlxB924X0D5aXaEKKwzhShXCiiqp3PULj+EPc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=VaIKfFS1Ias7NU8p3+p7cOuipPzWvV4fPGI4zFI20uVslpp1g+Fpc/DaGxRwhOGO7D BiVaL31tntAXVYIK8Dm80zIV89fj8VIPrR/zXEfqHbPqpPca7PBaqPB1ajKjjZL52nnt ivymFuPNcWr2DeraO9oxunGW3FxtUvB6IL170= Received: by 10.229.241.80 with SMTP id ld16mr861872qcb.111.1273707763146; Wed, 12 May 2010 16:42:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.181.70 with HTTP; Wed, 12 May 2010 16:42:23 -0700 (PDT) In-Reply-To: References: <1273263449.442916359@192.168.2.230> From: Vijay Date: Wed, 12 May 2010 16:42:23 -0700 Message-ID: Subject: Re: key is sorted? To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=00163630fce7c51ed404866e32d2 --00163630fce7c51ed404866e32d2 Content-Type: text/plain; charset=UTF-8 If you use Random partitioner, You will *NOT* get RowKey's sorted. (Columns are sorted always). Answer: If used Random partitioner True True Regards, On Wed, May 12, 2010 at 1:25 AM, David Boxenhorn wrote: > You do any kind of range slice, e.g. keys beginning with "abc"? But the > results will not be ordered? > > Please answer one of the following: > > True True > True False > False False > > Explain? > > Thanks! > > > On Sun, May 9, 2010 at 8:27 PM, Vijay wrote: > >> True, The Range slice support was enabled in Random Partitioner for the >> hadoop support. >> >> Random partitioner actually hash the Key and those keys are sorted so we >> cannot have the actual key in order.... (Hope this doesnt confuse you)... >> >> Regards, >> >> >> >> >> On Sun, May 9, 2010 at 12:00 AM, David Boxenhorn wrote: >> >>> This is something that I'm not sure that I understand. Can somebody >>> confirm/deny that I understand it? Thanks. >>> >>> If you use random partitioning, you can loop through all keys with a >>> range query, but they will not be sorted. >>> >>> True or False? >>> >>> On Sat, May 8, 2010 at 3:45 AM, AJ Chen wrote: >>> >>>> thanks, that works. -aj >>>> >>>> >>>> On Fri, May 7, 2010 at 1:17 PM, Stu Hood wrote: >>>> >>>>> Your IPartitioner implementation decides how the row keys are sorted: >>>>> see http://wiki.apache.org/cassandra/StorageConfiguration#Partitioner. You need to be using one of the OrderPreservingPartitioners if you'd like >>>>> a reasonable order for the keys. >>>>> >>>>> -----Original Message----- >>>>> From: "AJ Chen" >>>>> Sent: Friday, May 7, 2010 3:10pm >>>>> To: user@cassandra.apache.org >>>>> Subject: key is sorted? >>>>> >>>>> I have a super column family for "topic", key being the name of the >>>>> topic. >>>>> >>>> CompareSubcolumnsWith="BytesType" /> >>>>> When I retrieve the rows, the rows are not sorted by the key. Is the >>>>> row key >>>>> sorted in cassandra by default? >>>>> >>>>> -aj >>>>> -- >>>>> AJ Chen, PhD >>>>> Chair, Semantic Web SIG, sdforum.org >>>>> http://web2express.org >>>>> twitter @web2express >>>>> Palo Alto, CA, USA >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> AJ Chen, PhD >>>> Chair, Semantic Web SIG, sdforum.org >>>> http://web2express.org >>>> twitter @web2express >>>> Palo Alto, CA, USA >>>> >>> >>> >> > --00163630fce7c51ed404866e32d2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable If you use Random partitioner, You will NOT get RowKey's=C2=A0sorted. (Columns are sorted always).
Answer: If used Random partitioner
True True

Regards,
</VJ>



On Wed, May 12, 2010 at 1:25 AM, David B= oxenhorn <david@l= ookin2.com> wrote:
You do any kind of range slice, e.g. keys beginning with &= quot;abc"? But the results will not be ordered?

Please answer = one of the following:

True True
True False
False False

Explain?

Thanks!


On Sun, May 9, 2010 at 8:27 PM, Vijay &= lt;vijay2win@gmail= .com> wrote:
True, The Range slice support was enabled in Random Partitioner for the had= oop support.=C2=A0

Random partitioner actually hash the Key an= d those keys are sorted so we cannot have the actual key in order.... (Hope= this doesnt confuse you)...

Regards,
</VJ>



On Sun, May 9, 2010 at 12:00 AM, Da= vid Boxenhorn <david@lookin2.com> wrote:
This is something that I'm not sure that I understand.= Can somebody confirm/deny that I understand it? Thanks.

If you use = random partitioning, you can loop through all keys with a range query, but = they will not be sorted.

True or False?

On Sat, May 8, 2010 a= t 3:45 AM, AJ Chen <ajchen@web2express.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-l= eft:1px solid rgb(204, 204, 204);padding-left:1ex"> thanks, that works. -aj


On Fri, May 7, 2010 at 1:17 PM, Stu Hood <= ;stu.hood@racks= pace.com> wrote:
Your IPartitioner implementation decides how the row keys are sorted: see <= a href=3D"http://wiki.apache.org/cassandra/StorageConfiguration#Partitioner= " target=3D"_blank">http://wiki.apache.org/cassandra/StorageConfiguration#P= artitioner . You need to be using one of the OrderPreservingPartitioner= s if you'd like a reasonable order for the keys.

-----Original Message-----
From: "AJ Chen" <ajchen@web2express.org>
Sent: Friday, May 7, 2010 3:10pm
To: user@cas= sandra.apache.org
Subject: key is sorted?

I have a super column family for "topic", key being the name of t= he topic.
<ColumnFamily Name=3D"Topic" CompareWith=3D"UTF8Type"= ; ColumnType=3D"Super"
CompareSubcolumnsWith=3D"BytesType" />
When I retrieve the rows, the rows are not sorted by the key. Is the row ke= y
sorted in cassandra by default?

-aj
--
AJ Chen, PhD
Chair, Semantic Web SIG, s= dforum.org
http://web2express.org=
twitter @web2express
Palo Alto, CA, USA





--
AJ Chen, Ph= D
Chair, Semantic Web SIG, sdforum.org
http://web2express.org
twitter @web2express
Palo Alto, CA, USA




--00163630fce7c51ed404866e32d2--