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_r349954321
 
 

 ##########
 File path: 
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/SourceFormatAdapter.java
 ##########
 @@ -126,4 +127,13 @@ public SourceFormatAdapter(Source source) {
         throw new IllegalArgumentException("Unknown source type (" + 
source.getSourceType() + ")");
     }
   }
+
+  /**
+   * This method is needed to set Config.DEFAULT_MAX_EVENTS_FROM_KAFKA_SOURCE 
to some lower value for test cases,
+   * gets called only from TestKafkaSource.java class
+   * @param maxEventsFromKafkaSource
+   */
+  public void setDefaultMaxEventsFromKafkaSource(long 
maxEventsFromKafkaSource) {
 
 Review comment:
   Will it take so long if the messages in kafka topic is very small(about 100) 
while `DEFAULT_MAX_EVENTS_FROM_KAFKA_SOURCE ` is 5M? 
   Besides, IMHO, it's a little strange to add this method here, how about 
resetting `KafkaOffsetGen.Config.DEFAULT_MAX_EVENTS_FROM_KAFKA_SOURCE` directly 
in `TestKafkaSource` and remove this method?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to