leesf commented on a change in pull request #1719:
URL: https://github.com/apache/hudi/pull/1719#discussion_r439723271



##########
File path: 
hudi-utilities/src/test/java/org/apache/hudi/utilities/sources/TestKafkaSource.java
##########
@@ -93,6 +93,18 @@ private TypedProperties createPropsForJsonSource(Long 
maxEventsToReadFromKafkaSo
     return props;
   }
 
+  private TypedProperties createLatestPropsForJsonSource(Long 
maxEventsToReadFromKafkaSource) {
+    TypedProperties props = new TypedProperties();
+    props.setProperty("hoodie.deltastreamer.source.kafka.topic", 
TEST_TOPIC_NAME);
+    props.setProperty("bootstrap.servers", testUtils.brokerAddress());
+    props.setProperty("auto.offset.reset", "latest");
+    props.setProperty("hoodie.deltastreamer.kafka.source.maxEvents",
+            maxEventsToReadFromKafkaSource != null ? 
String.valueOf(maxEventsToReadFromKafkaSource) :
+                    String.valueOf(Config.maxEventsFromKafkaSource));
+    props.setProperty(ConsumerConfig.GROUP_ID_CONFIG, 
UUID.randomUUID().toString());
+    return props;
+  }
+

Review comment:
       we would merge the method with `createPropsForJsonSource` to reuse code.




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


Reply via email to