incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wojciech Kaczmarek <kaczmare...@gmail.com>
Subject Re: Row with many columns
Date Fri, 19 Feb 2010 10:46:25 GMT
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 <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 worldId &
>> objectId as a key, or just objectId alone.
>>
>>
>> On Thu, Feb 18, 2010 at 23:18, ruslan usifov <ruslan.usifov@gmail.com>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 <tzz@lifelogs.com>
>>>
>>>> On Thu, 18 Feb 2010 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?  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
>>>>
>>>>
>>>
>>
>

Mime
View raw message