Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 33679 invoked from network); 19 Feb 2010 10:47:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Feb 2010 10:47:14 -0000 Received: (qmail 91153 invoked by uid 500); 19 Feb 2010 10:47:14 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 91131 invoked by uid 500); 19 Feb 2010 10:47:14 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 91122 invoked by uid 99); 19 Feb 2010 10:47:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2010 10:47:14 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kaczmarek.w@gmail.com designates 209.85.218.227 as permitted sender) Received: from [209.85.218.227] (HELO mail-bw0-f227.google.com) (209.85.218.227) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2010 10:47:06 +0000 Received: by bwz27 with SMTP id 27so1202279bwz.20 for ; Fri, 19 Feb 2010 02:46:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=5TTKW54/NSG/goT5Y9sDjeN5Kv4/IUE/Dg4sxDcSfhg=; b=bfGKfBlQ2Y75fF/lXctKoilouKNA4zqTML0ladOG5Lrv1wGfWsumUCSMlHQKJX4N2z kN2n9O8KPnnGxKoXCC45BXQsbQiscAMfz3+oqXWbJkcFeXBB6s8O+rKyEriXRuaWYORm TZgIKhO6PCghU1C5JdnMuJjeXhpI/b7J+ceS0= 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=lZoSANcz+WnRsJl9rUIckcXP872sQfbVxN4PmwtFeQlsnFLneC4ex12lYRuGQFlTRX M4fx1WA+WEwj/dX/7EFTMTRLYaMLq+UvbjZs86HqRXOiyi+DGBmNFSK3g+LGznoTBci+ w4x/QLMLaVbieVvqkWwvRzwIFfHztwohu1e5c= MIME-Version: 1.0 Received: by 10.204.160.147 with SMTP id n19mr2357396bkx.182.1266576405122; Fri, 19 Feb 2010 02:46:45 -0800 (PST) In-Reply-To: <9b048d181002182340t2678dfd7mb821c80ac617b746@mail.gmail.com> References: <9b048d181002170748t7379dcfen57537618ec97459b@mail.gmail.com> <9b048d181002171344g36f7144ch11a219bc9a49f776@mail.gmail.com> <87iq9uwqq4.fsf@lifelogs.com> <9b048d181002180705r7989d598r605fb9a4e10c7a8e@mail.gmail.com> <877hqawlvi.fsf@lifelogs.com> <9b048d181002181418i6c3cbc92qe4704ce5d79847e1@mail.gmail.com> <31ae10911002181518q671dfe1vf06a8d38104e7dff@mail.gmail.com> <9b048d181002182340t2678dfd7mb821c80ac617b746@mail.gmail.com> From: Wojciech Kaczmarek Date: Fri, 19 Feb 2010 11:46:25 +0100 Message-ID: <31ae10911002190246m208876b3qa2781f22d04d7651@mail.gmail.com> Subject: Re: Row with many columns To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=0015175cb2d6b55025047ff1cc5f X-Virus-Checked: Checked by ClamAV on apache.org --0015175cb2d6b55025047ff1cc5f Content-Type: text/plain; charset=ISO-8859-1 You can use get_range_slice with the start_key and finish_key crafted like this: assume id is "<10-digits-worldId:whatever_objectId>" to get objects from world with id=42 you do: start_key='0000000042:', end_key='0000000042~' (for the ending mark of end_key choose any character which is greater than your delimiter ':' in a sort order) Just remember the keys ordering is defined by the specific Partitioner class used) On Fri, Feb 19, 2010 at 08:40, ruslan usifov wrote: > But how can i do range query?, for example get all objects of wolrd? > > 2010/2/19 Wojciech Kaczmarek > > Hi Ruslan, >> >> I'd model your objects as rows. You can have a concatenation of worldId & >> objectId as a key, or just objectId alone. >> >> >> On Thu, Feb 18, 2010 at 23:18, ruslan usifov wrote: >> >>> For example i have worlds with objects in it (stones, trees and so on). >>> In my case worldid is key, objects are supercollums(some extra info or draw) >>> >>> >>> 2010/2/18 Ted Zlatanov >>> >>>> On Thu, 18 Feb 2010 18:05:50 +0300 ruslan usifov < >>>> ruslan.usifov@gmail.com> wrote: >>>> >>>> ru> 2010/2/18 Ted Zlatanov >>>> >> Maybe you should partition your data differently? What does each of >>>> >> these tiny columns represent and how do you allocate the row key? >>>> >>>> ru> Friends relations, for statistic >>>> >>>> Sorry, that's not enough information. Can you give an example of some >>>> columns and what they mean, and also some row keys and what they mean? >>>> >>>> Ted >>>> >>>> >>> >> > --0015175cb2d6b55025047ff1cc5f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You can use get_range_slice with the start_key and finish_key crafted like = this:
assume id is "<10-digits-worldId:whatever_objectId>&quo= t;
to get objects from world with id=3D42 you do:
start_key=3D'00= 00000042:', end_key=3D'0000000042~'
(for the ending mark of end_key choose any character which is greater than = your delimiter ':' in a sort order)
Just remember the keys order= ing is defined by the specific Partitioner class used)

On Fri, Feb 19, 2010 at 08:40, ruslan usifov <ruslan.usifov@gmail.com> = wrote:
But how can i do range query?, for example get all objects of wolrd?
2010/2/19 Wojciech Kaczmarek <kaczmarek.w= @gmail.com>

Hi Ruslan,
I'd model your objects as rows. You can have a concatenation of worldI= d & objectId as a key, or just objectId alone.


On Thu, Feb 18, 2010 at = 23:18, ruslan usifov <ruslan.usifov@gmail.com> wrote:<= br>
For example i hav= e worlds with objects in it (stones, trees and so on). In my case worldid i= s key, objects are supercollums(some extra info or draw)


2010/2/18 Ted Zlatanov <= span dir=3D"ltr"><= tzz@lifelogs.com>
On Thu, 18 Feb 20= 10 18:05:50 +0300 ruslan usifov <ruslan.usifov@gmail.com> wrote:

ru> 2010/2/18 Ted Zlatanov <tzz@lifelogs.com>
>> Maybe you should partition your data differently? =A0What doe= s each of
>> these tiny columns represent and how do you allocate the row key?<= br>
ru> Friends relations, for statistic

Sorry, that's not enough information. =A0Can you give an example of som= e
columns and what they mean, and also some row keys and what they mean?

Ted





--0015175cb2d6b55025047ff1cc5f--