Make Hadoop CF splits more polite to custom orderered partitioners

patch by Chris Lockfort; reviewed by Philip Thompson for CASSANDRA-10400
This commit is contained in:
Chris Lockfort 2015-09-25 14:03:39 -07:00 committed by Aleksey Yeschenko
parent f3cd3ed7bb
commit 1c073e70ed
2 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2.2.3
* Make Hadoop CF splits more polite to custom orderered partitioners (CASSANDRA-10400)
2.2.2
* cqlsh prompt includes name of keyspace after failed `use` statement (CASSANDRA-10369)
* Configurable page size in cqlsh (CASSANDRA-9855)

View File

@ -203,8 +203,6 @@ public abstract class AbstractColumnFamilyInputFormat<K, Y> extends InputFormat<
for (Host endpoint : hosts)
endpoints[endpointIndex++] = endpoint.getAddress().getHostName();
boolean partitionerIsOpp = partitioner instanceof OrderPreservingPartitioner || partitioner instanceof ByteOrderedPartitioner;
for (TokenRange subSplit : subSplits.keySet())
{
List<TokenRange> ranges = subSplit.unwrap();
@ -212,9 +210,9 @@ public abstract class AbstractColumnFamilyInputFormat<K, Y> extends InputFormat<
{
ColumnFamilySplit split =
new ColumnFamilySplit(
partitionerIsOpp ?
partitioner.preservesOrder() ?
subrange.getStart().toString().substring(2) : subrange.getStart().toString(),
partitionerIsOpp ?
partitioner.preservesOrder() ?
subrange.getEnd().toString().substring(2) : subrange.getStart().toString(),
subSplits.get(subSplit),
endpoints);