danny0405 commented on code in PR #9617:
URL: https://github.com/apache/hudi/pull/9617#discussion_r1329551290


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java:
##########
@@ -163,6 +166,27 @@ public static HoodieIndexConfig 
getIndexConfig(Configuration conf) {
         .build();
   }
 
+  /**
+   * Returns the timeGenerator config with given configuration.
+   */
+  public static HoodieTimeGeneratorConfig getTimeGeneratorConfig(Configuration 
conf) {
+    HoodieTimeGeneratorConfig.Builder builder = 
HoodieTimeGeneratorConfig.newBuilder()
+        .withPath(conf.getString(FlinkOptions.PATH))
+        .fromProperties(flinkConf2TypedProperties(conf));
+
+    if (OptionsResolver.isLockRequired(conf) && 
!conf.containsKey(HoodieLockConfig.LOCK_PROVIDER_CLASS_NAME.key())) {
+      // configure the fs lock provider by default

Review Comment:
   Do we need this? Shouldn't the lock provider already be configured in the 
configuration? Or maybe
   
`HoodieWriteClients.getHoodieClientConfig(Configuration).getHoodieTimeGeneratorConfig()`
 should work?



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

Reply via email to