leesf commented on a change in pull request #1039: [HUDI-340]: made max events to read from kafka source configurable URL: https://github.com/apache/incubator-hudi/pull/1039#discussion_r349792634
########## File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/KafkaOffsetGen.java ########## @@ -229,7 +229,11 @@ public KafkaOffsetGen(TypedProperties props) { new HashMap(ScalaHelpers.toJavaMap(cluster.getLatestLeaderOffsets(topicPartitions).right().get())); // Come up with final set of OffsetRanges to read (account for new partitions, limit number of events) - long numEvents = Math.min(DEFAULT_MAX_EVENTS_TO_READ, sourceLimit); + long maxEventsToReadFromKafka = props.getLong(Config.MAX_EVENTS_FROM_KAFKA_SOURCE_PROP, + Config.DEFAULT_MAX_EVENTS_FROM_KAFKA_SOURCE); + maxEventsToReadFromKafka = (maxEventsToReadFromKafka == Long.MAX_VALUE || maxEventsToReadFromKafka == Integer.MAX_VALUE) ? Review comment: ` '?' should be on a new line`(you could also click the details below to see this) ---------------------------------------------------------------- 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 With regards, Apache Git Services