incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ching-Cheng Chen <cc...@evidentsoftware.com>
Subject Re: Is it possible to get list of row keys?
Date Wed, 23 Feb 2011 12:54:05 GMT
You can use the setRowCount() method to specify how many keys to return per
call.
By default is 100.

Beware don't set it too high since it might cause OOM.

And underline code will pre-allocate an array list with size you speify in
setRowCount().   So you might get a OOM if
you used something like Interger.MAX.

Regards,

Chen

www.evidentsoftware.com

On Wed, Feb 23, 2011 at 2:24 AM, Roshan Dawrani <roshandawrani@gmail.com>wrote:

> Does it help:
> https://github.com/rantav/hector/blob/master/core/src/test/java/me/prettyprint/cassandra/model/RangeSlicesQueryTest.java
>
>
> <https://github.com/rantav/hector/blob/master/core/src/test/java/me/prettyprint/cassandra/model/RangeSlicesQueryTest.java>It
> uses setReturnKeysOnly()...
>
> Same for index queries in:
> https://github.com/rantav/hector/blob/master/core/src/test/java/me/prettyprint/cassandra/model/IndexedSlicesQueryTest.java
>
> I think it will not return all keys from the ColumnFamily at one shot (as
> with rows)
>
> So, if you want all, you will need to keep paging forward and collecting
> the keys.
>
> On Wed, Feb 23, 2011 at 12:41 PM, Joshua Partogi <joshua.java@gmail.com>wrote:
>
>> Hi,
>>
>> Assuming the application does not know the list of keys that is stored
>> inside cassandra, how would it be possible to get list of row keys?
>> This list of row keys is going to be used to get a range of slices.
>>
>> Thank you for your help.
>>
>> --
>> http://twitter.com/jpartogi
>>
>
>
>
> --
> Roshan
> Blog: http://roshandawrani.wordpress.com/
> Twitter: @roshandawrani <http://twitter.com/roshandawrani>
> Skype: roshandawrani
>
>

Mime
View raw message