cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <>
Subject Re: Can I retrieve specific key range from a table in RandomPartitioner?
Date Thu, 12 Aug 2010 21:03:13 GMT
Try setting the end key to an empty string, and then set the number of rows to something sane
and make multiple calls if needed. Or you may be able to make your own secondary index another
CF, so you do two reads: one on the secondary index then one of the rows you want.

There has been some discussion about range slices with RP recently that may be helpful see


On 12 Aug, 2010,at 08:50 PM, ChingShen <> wrote:

I have a key range that between 0000000000 and 0000001000, and my code as below:

SlicePredicate predicate = new SlicePredicate();
ColumnParent parent = new ColumnParent(columnFamily);
KeyRange k = new KeyRange(1000);
List<KeySlice> results = client.get_range_slices(keyspace, parent, predicate, k, ConsistencyLevel.ONE);   

On Thu, Aug 12, 2010 at 4:44 PM, ChingShen <> wrote:
Hi all,

   Can I retrieve specific key range from a table in RandomPartitioner? Because I always
got below exception:
Exception in thread "main" 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)



  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message