Re: Can I retrieve specific key range from a table in RandomPartitioner?

2010-10-01 Thread ilndinesh

I cam through the same problem. I have set the end key same as start key, it
worked. (Kinda temp fix...)
-- 
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Can-I-retrieve-specific-key-range-from-a-table-in-RandomPartitioner-tp5415347p5591681.html
Sent from the cassandra-u...@incubator.apache.org mailing list archive at 
Nabble.com.


Re: Can I retrieve specific key range from a table in RandomPartitioner?

2010-08-12 Thread Aaron Morton
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 http://www.mail-archive.com/user@cassandra.apache.org/msg05017.htmlAaronOn 12 Aug, 2010,at 08:50 PM, ChingShen  wrote:I have a key range that between 00 and 001000, and my code as below:SlicePredicate predicate = new SlicePredicate();predicate.setColumn_names(columns);ColumnParent parent = new ColumnParent(columnFamily);
KeyRange k = new KeyRange(1000);k.setStart_key(key[0]);k.setEnd_key(key[1000]);List results = client.get_range_slices(keyspace, parent, predicate, k, ConsistencyLevel.ONE);        
On Thu, Aug 12, 2010 at 4:44 PM, ChingShen <chingshenc...@gmail.com> 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)

Thanks.Shen



Re: Can I retrieve specific key range from a table in RandomPartitioner?

2010-08-12 Thread ChingShen
I have a key range that between 00 and 001000, and my code as
below:

SlicePredicate predicate = new SlicePredicate();
predicate.setColumn_names(columns);
ColumnParent parent = new ColumnParent(columnFamily);
KeyRange k = new KeyRange(1000);
k.setStart_key(key[0]);
k.setEnd_key(key[1000]);
List 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)
>
> Thanks.
>
> Shen
>


Can I retrieve specific key range from a table in RandomPartitioner?

2010-08-12 Thread ChingShen
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)

Thanks.

Shen