cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] cassandra git commit: Make Hadoop CF splits more polite to custom orderered partitioners
Date Fri, 02 Oct 2015 20:21:59 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 5ffae4f45 -> a3f1eedae


Make Hadoop CF splits more polite to custom orderered partitioners

patch by Chris Lockfort; reviewed by Philip Thompson for CASSANDRA-10400


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1c073e70
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1c073e70
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1c073e70

Branch: refs/heads/cassandra-3.0
Commit: 1c073e70edda23c97267228f00dc611d0fe61332
Parents: f3cd3ed
Author: Chris Lockfort <clockfort@palantir.com>
Authored: Fri Sep 25 14:03:39 2015 -0700
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Fri Oct 2 13:12:01 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                    | 4 ++++
 .../cassandra/hadoop/AbstractColumnFamilyInputFormat.java      | 6 ++----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1c073e70/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9c70c74..47fa4c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1c073e70/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java b/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
index 103d478..e531ad1 100644
--- a/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/AbstractColumnFamilyInputFormat.java
@@ -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);


Mime
View raw message