default OrderPreservingPartitioner changed

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

default OrderPreservingPartitioner changed

Jonathan Ellis-3
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
Reply | Threaded
Open this post in threaded view
|

Re: default OrderPreservingPartitioner changed

Mark Robson
2009/8/7 Jonathan Ellis <[hidden email]>
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