tomstepp commented on code in PR #33596:
URL: https://github.com/apache/beam/pull/33596#discussion_r1925819614
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaUnboundedSource.java:
##########
@@ -113,10 +113,16 @@ public List<KafkaUnboundedSource<K, V>> split(int
desiredNumSplits, PipelineOpti
partitions.size() > 0,
"Could not find any partitions. Please check Kafka configuration and
topic names");
- int numSplits = Math.min(desiredNumSplits, partitions.size());
- // XXX make all splits have the same # of partitions
- while (partitions.size() % numSplits > 0) {
- ++numSplits;
+ int numSplits;
+ if (isOffsetDeduplication()) {
+ // Enforce 1:1 split to partition ratio for offset deduplication.
Review Comment:
Done.
--
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]