zhedoubushishi commented on a change in pull request #2833:
URL: https://github.com/apache/hudi/pull/2833#discussion_r631482649



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/config/DefaultHoodieConfig.java
##########
@@ -44,8 +56,93 @@ public static void setDefaultOnCondition(Properties props, 
boolean condition, De
     }
   }
 
+  public static <T> void set(Properties props, ConfigOption<T> cfg, String 
val) {
+    props.setProperty(cfg.key(), val);
+  }
+
+  public static <T> void setDefaultValue(Properties props, ConfigOption<T> 
configOption) {
+    if (!contains(props, configOption)) {
+      Option<String> inferValue = Option.empty();
+      if (configOption.getInferFunc() != null) {
+        inferValue = (Option<String>) configOption.getInferFunc().apply(props);

Review comment:
       Good point, make it generic.




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