incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Boxenhorn <da...@lookin2.com>
Subject Re: Order Preserving Partitioner
Date Wed, 26 May 2010 09:32:02 GMT
Just in case you don't know: You can do range searches on keys even with
Random Partitioner, you just won't get the results in order. If this is good
enough for you (e.g. if you can order the results on the client, or if you
just need to get the right answer, but not the right order), then you should
use Random Partitioner.

(I bring this up because it confused me until recently.)

On Wed, May 26, 2010 at 5:14 AM, Steve Lihn <stevelihn@gmail.com> wrote:

> I have a question on using Order Preserving Partitioner.
>
> Many rowKeys in my system will be related to dates, so it seems natural to
> use Order Preserving Partitioner instead of the default Random Partitioner.
> However, I have been warned that special attention has to be applied for
> Order Preserving Partitioner to work properly (basically to ensure a good
> key distribution and avoid "hot spot") and reverting it back to Random may
> not be easy. Also not every rowKey is related to dates, for these, using
> Random Partitioner is okay, but there is only one place to set Partitioner.
>
> (Note: The intension of this warning is actually to discredit Cassandra and
> persuade me not to use it.)
>
> It seems the choice of Partitioner is defined in the storage-conf.xml and
> is a global property. My question why does it have to be a global property?
> Is there a future plan to make it customizable per KeySpace (just like you
> would choose hash or range partition for different table/data in RDBMS) ?
>
> Thanks,
> Steve
>

Mime
View raw message