yifan-c commented on code in PR #34:
URL:
https://github.com/apache/cassandra-analytics/pull/34#discussion_r1465744555
##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java:
##########
@@ -139,16 +137,33 @@ public List<StreamResult>
write(Iterator<Tuple2<DecoratedKey, Object[]>> sourceI
Map<String, Object> valueMap = new HashMap<>();
try
{
- Set<Range<BigInteger>> newRanges = new
HashSet<>(initialTokenRangeMapping.getRangeMap().asMapOfRanges().keySet());
+ // Use list to preserve order of ranges
+ List<Range<BigInteger>> newRanges = new
ArrayList<>(initialTokenRangeMapping.getRangeMap()
Review Comment:
use list to preserve the order. It is derived from keySet, so uniqueness is
inherited.
--
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]