garyli1019 commented on a change in pull request #1652:
URL: https://github.com/apache/hudi/pull/1652#discussion_r429680573



##########
File path: 
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/KafkaOffsetGen.java
##########
@@ -207,6 +208,11 @@ public KafkaOffsetGen(TypedProperties props) {
     maxEventsToReadFromKafka = (maxEventsToReadFromKafka == Long.MAX_VALUE || 
maxEventsToReadFromKafka == Integer.MAX_VALUE)
         ? Config.maxEventsFromKafkaSource : maxEventsToReadFromKafka;
     long numEvents = sourceLimit == Long.MAX_VALUE ? maxEventsToReadFromKafka 
: sourceLimit;
+
+    if (numEvents < toOffsets.size()) {

Review comment:
       Delta streamer has `--continues` mode, which means it is intended to not 
consuming data in some cases. Throwing an exception here will interrupt the 
application unexpectedly. 
   If the goal is to provide a hint to the user, I think we can add a log to 
`computeOffsetRanges`.




----------------------------------------------------------------
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.

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


Reply via email to