waitingF commented on code in PR #8376:
URL: https://github.com/apache/hudi/pull/8376#discussion_r1161192994
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/KafkaOffsetGen.java:
##########
@@ -151,6 +166,40 @@ public static OffsetRange[]
computeOffsetRanges(Map<TopicPartition, Long> fromOf
return ranges;
}
+ public static OffsetRange[] splitRangesByCount(OffsetRange[] oldRanges,
long maxEvents) {
+ List<OffsetRange> newRanges = new ArrayList<>();
+ for (OffsetRange range : oldRanges) {
+ newRanges.addAll(splitSingleRange(range, maxEvents));
+ }
+ return newRanges.toArray(new OffsetRange[0]);
+ }
+
+ public static OffsetRange[] mergeRangesByTp(OffsetRange[] oldRanges) {
Review Comment:
ok, will do.
--
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]