Updated Branches: refs/heads/trunk dd8a3c450 -> 8f3d9b837
clean up partitioner comments Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f3d9b83 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f3d9b83 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f3d9b83 Branch: refs/heads/trunk Commit: 8f3d9b8371fa7c5dea83d45d83ec7fe4911a96c0 Parents: dd8a3c4 Author: Jonathan Ellis <[email protected]> Authored: Mon Oct 22 16:15:01 2012 -0500 Committer: Jonathan Ellis <[email protected]> Committed: Mon Oct 22 16:15:08 2012 -0500 ---------------------------------------------------------------------- NEWS.txt | 5 +++++ conf/cassandra.yaml | 11 ++++------- .../apache/cassandra/io/sstable/SSTableReader.java | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f3d9b83/NEWS.txt ---------------------------------------------------------------------- diff --git a/NEWS.txt b/NEWS.txt index 920940f..3736a2f 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -20,6 +20,11 @@ Upgrading the ability to read data files from Cassandra versions at least back to 0.6, so a non-rolling upgrade remains possible with just one step. + - The default partitioner for new clusters is Murmur3Partitioner, + which is about 10% faster for index-intensive workloads. Partitioners + cannot be changed once data is in the cluster, however, so if you are + switching to the 1.2 cassandra.yaml, you should change this to + RandomPartitioner or whatever your old partitioner was. - If you using counters and upgrading from a version prior to 1.1.6, you should drain existing Cassandra nodes prior to the upgrade to prevent overcount during commitlog replay (see http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f3d9b83/conf/cassandra.yaml ---------------------------------------------------------------------- diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml index 37fc572..a79e150 100644 --- a/conf/cassandra.yaml +++ b/conf/cassandra.yaml @@ -62,16 +62,13 @@ authority: org.apache.cassandra.auth.AllowAllAuthority # The partitioner is responsible for distributing rows (by key) across # nodes in the cluster. Any IPartitioner may be used, including your # own as long as it is on the classpath. Out of the box, Cassandra -# provides org.apache.cassandra.dht.RandomPartitioner -# org.apache.cassandra.dht.ByteOrderedPartitioner, -# org.apache.cassandra.dht.OrderPreservingPartitioner (deprecated), -# and org.apache.cassandra.dht.CollatingOrderPreservingPartitioner -# (deprecated). +# provides org.apache.cassandra.dht.{Murmur3Partitioner, RandomPartitioner +# ByteOrderedPartitioner, OrderPreservingPartitioner (deprecated)}. # # - RandomPartitioner distributes rows across the cluster evenly by md5. -# When in doubt, this is the best option. +# This is the default prior to 1.2 and is retained for compatibility. # - Murmur3Partitioner is similar to RandomPartioner but uses Murmur3_128 -# Hash Function instead of md5 +# Hash Function instead of md5. When in doubt, this is the best option. # - ByteOrderedPartitioner orders rows lexically by key bytes. BOP allows # scanning rows in key order, but the ordering can generate hot spots # for sequential insertion workloads. http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f3d9b83/src/java/org/apache/cassandra/io/sstable/SSTableReader.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java index aee576e..1514a2c 100644 --- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java +++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java @@ -172,8 +172,8 @@ public class SSTableReader extends SSTable String partitionerName = partitioner.getClass().getCanonicalName(); if (sstableMetadata.partitioner != null && !partitionerName.equals(sstableMetadata.partitioner)) { - logger.warn("Changing paritioner on a existing cluster can cause data loose, Please verify your partitioner in cassandra.yaml"); - logger.error(String.format("Cannot open %s because partitioner does not match %s != %s",descriptor, sstableMetadata.partitioner, partitionerName)); + logger.error(String.format("Cannot open %s because partitioner does not match %s != %s. Please verify your partitioner in cassandra.yaml", + descriptor, sstableMetadata.partitioner, partitionerName)); System.exit(1); }
