You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rana Aich <ai...@gmail.com> on 2010/10/12 00:39:08 UTC

Understanding Range queries with Random Partition

Hi,

I've used range queries for Order Preserving Partition and got the
satisfactory results.
For instance, I can find first 1 million keys that starts with key
'20080101000000' and ends with '20080102000000'.

Now I'm trying to do the same with Random Partitioning. But here I find that
for Range reads with RandomPartitioner I cannot set my end keys at all, or
else I get the InvalidRequestException(why:start key's md5 sorts after end
key's md5.  this is not allowed; you probably should not specify end key at
all, under RandomPartitioner)

So I set my end key to empty string.

Now I get the results - but they are not the first 1 million, rather the key
values are quite random. Infact I'm also getting keys from year 2009.

Is there any way I can find the keys restricted to 20080101 considering the
fact one day of our data contains 15 million records.

Regards,

Rana