arjunashok commented on code in PR #17:
URL:
https://github.com/apache/cassandra-analytics/pull/17#discussion_r1420911706
##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/StreamSession.java:
##########
@@ -145,32 +157,27 @@ private List<CommitResult> commit(StreamResult
streamResult) throws ExecutionExc
@VisibleForTesting
List<RingInstance> getReplicas()
{
- Map<Range<BigInteger>, List<RingInstance>> overlappingRanges =
ring.getSubRanges(tokenRange).asMapOfRanges();
+ List<RingInstance> exclusions = failureHandler.getFailedInstances();
+ final Map<Range<BigInteger>, List<RingInstance>> overlappingRanges =
tokenRangeMapping.getSubRanges(tokenRange).asMapOfRanges();
- Preconditions.checkState(overlappingRanges.keySet().size() == 1,
- String.format("Partition range %s is mapping
more than one range %s",
- tokenRange, overlappingRanges));
+ LOGGER.debug("[{}]: Stream session token range: {} overlaps with ring
ranges: {}", sessionID, tokenRange, overlappingRanges);
+ Preconditions.checkState(!tokenRange.isEmpty(),
Review Comment:
Moved this up to the point where we extract the token-range for the
task/partition. We do not need to do this check for overlapping ranges as is it
implicitly validated if we do not have any resulting replicas.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]