arjunashok commented on code in PR #17:
URL: 
https://github.com/apache/cassandra-analytics/pull/17#discussion_r1420954777


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/TokenPartitioner.java:
##########
@@ -215,19 +221,19 @@ private void readObject(ObjectInputStream in) throws 
ClassNotFoundException, IOE
 
     // In order to best utilize the number of Spark cores while minimizing the 
number of commit calls,
     // we calculate the number of splits that will just match or exceed the 
total number of available Spark cores.
-    // NOTE: The actual number of partitions that result from this should 
always be at least
-    //       the number of token ranges times the number of splits, but can be 
slightly more.
-    public int calculateSplits(CassandraRing<RingInstance> ring,
+    // Note that the actual number of partitions that result from this should 
always be at least the number of token ranges * the number of splits,
+    // but can be slightly more.
+    public int calculateSplits(TokenRangeMapping<RingInstance> 
tokenRangeMapping,
                                Integer numberSplits,
                                int defaultParallelism,
                                Integer cores)
     {
-        if (numberSplits >= 0)
+        if (numberSplits != -1)

Review Comment:
   Yep, the previous check makes sense. Don't recall why this change was 
needed. Will revert.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to