You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Yang <te...@gmail.com> on 2011/08/04 22:59:22 UTC

get_range_slices( start=null, end=null ) ??

our keyspace is really not that big,
about 1million rows, each about 500 bytes

but doing a get_range_slices() on the entire key range gives OOM
errors (I bumped up the -Xmx arg now, still trying, but
giving such a large chunk of data in one RPC call is still bad),  so
that leaves me the option to return the entire ks "page by page",

but the problem is that I'm using random partitioner,  so I can't cut
the ks into ranges of
0---10K
10K----20K
.......

since the token for (0) is not guaranteed to be smaller than that of (10000)



so what is the best way to do this?

Thanks
Yang

Re: get_range_slices( start=null, end=null ) ??

Posted by Yang <te...@gmail.com>.
ah.... got it , thanks!

On Thu, Aug 4, 2011 at 2:59 PM, Robert Jackson
<ro...@promedicalinc.com> wrote:
> You should be able to specify the count parameter to your KeyRange and just use the last key returned as your start_key for the next "page".
>
> Sent from my iPhone
>
> On Aug 4, 2011, at 5:00 PM, Yang <te...@gmail.com> wrote:
>
>> our keyspace is really not that big,
>> about 1million rows, each about 500 bytes
>>
>> but doing a get_range_slices() on the entire key range gives OOM
>> errors (I bumped up the -Xmx arg now, still trying, but
>> giving such a large chunk of data in one RPC call is still bad),  so
>> that leaves me the option to return the entire ks "page by page",
>>
>> but the problem is that I'm using random partitioner,  so I can't cut
>> the ks into ranges of
>> 0---10K
>> 10K----20K
>> .......
>>
>> since the token for (0) is not guaranteed to be smaller than that of (10000)
>>
>>
>>
>> so what is the best way to do this?
>>
>> Thanks
>> Yang
>

Re: get_range_slices( start=null, end=null ) ??

Posted by Robert Jackson <ro...@promedicalinc.com>.
You should be able to specify the count parameter to your KeyRange and just use the last key returned as your start_key for the next "page". 

Sent from my iPhone

On Aug 4, 2011, at 5:00 PM, Yang <te...@gmail.com> wrote:

> our keyspace is really not that big,
> about 1million rows, each about 500 bytes
> 
> but doing a get_range_slices() on the entire key range gives OOM
> errors (I bumped up the -Xmx arg now, still trying, but
> giving such a large chunk of data in one RPC call is still bad),  so
> that leaves me the option to return the entire ks "page by page",
> 
> but the problem is that I'm using random partitioner,  so I can't cut
> the ks into ranges of
> 0---10K
> 10K----20K
> .......
> 
> since the token for (0) is not guaranteed to be smaller than that of (10000)
> 
> 
> 
> so what is the best way to do this?
> 
> Thanks
> Yang