You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jonathan Ellis <jb...@gmail.com> on 2009/08/08 00:04:05 UTC

default OrderPreservingPartitioner changed

The default OPP now does comparisons based strictly on byte order, and
is no longer collation aware.  This is a better default choice for
those who don't need collation since it's much faster.  If you do need
collation, the old partitioner is still available as CollatingOPP:

-   <Partitioner>org.apache.cassandra.dht.OrderPreservingPartitioner</Partitioner>
+   <Partitioner>org.apache.cassandra.dht.CollatingOrderPreservingPartitioner</Partitioner>

If you have test data on trunk using the old OPP across more than one
node, you need to use the CollatingOPP for the partitioning to match
what you have on disk.

-Jonathan

Re: default OrderPreservingPartitioner changed

Posted by Mark Robson <ma...@gmail.com>.
2009/8/7 Jonathan Ellis <jb...@gmail.com>

> The default OPP now does comparisons based strictly on byte order, and
> is no longer collation aware.  This is a better default choice for
> those who don't need collation since it's much faster.  If you do need
> collation, the old partitioner is still available as CollatingOPP:



That is a very good idea; the collation support was somewhat confusing
anyway.

If you need to put case-insensitive data into keys to do lookups / range
scans etc, just convert them to lowercase at insert-time. You can store the
original capitalisation in a column value.

Also it makes it consistent with what (e.g.) memcached does.

Mark