Skip to content

Commit

Permalink
Use the simple name of the partitioner
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Kendall <paul.kendall@orionhealth.com>
  • Loading branch information
pkendall64 committed May 8, 2017
1 parent 4c5672f commit 3b00163
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -153,16 +153,15 @@ public CQLStoreManager(final Configuration configuration) throws BackendExceptio
fb.multiQuery(true);

final String partitioner = this.cluster.getMetadata().getPartitioner();
switch (partitioner) {
case "org.apache.cassandra.dht.RandomPartitioner":
case "org.apache.cassandra.dht.Murmur3Partitioner": {
switch (partitioner.substring(partitioner.lastIndexOf('.')+1)) {
case "RandomPartitioner":
case "Murmur3Partitioner": {
fb.keyOrdered(false).orderedScan(false).unorderedScan(true);
break;
}
case "org.apache.cassandra.dht.ByteOrderedPartitioner": {
case "ByteOrderedPartitioner": {
fb.keyOrdered(true).orderedScan(true).unorderedScan(false);
break;

}
default: {
throw new IllegalArgumentException("Unrecognized partitioner: " + partitioner);
Expand Down

0 comments on commit 3b00163

Please sign in to comment.