yihua commented on code in PR #11943:
URL: https://github.com/apache/hudi/pull/11943#discussion_r1811099005


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -1239,16 +1234,60 @@ public String getBasePath() {
   }
 
   public HoodieFileFormat getBaseFileFormat() {
-    return HoodieFileFormat.valueOf(getStringOrDefault(BASE_FILE_FORMAT));
+    return 
HoodieFileFormat.valueOf(getStringOrDefault(BASE_FILE_FORMAT).toUpperCase());
+  }
+
+  public String getRecordMergerStrategy() {
+    return getString(RECORD_MERGER_STRATEGY);
+  }
+
+  public RecordMergeMode getRecordMergeMode() {
+    return RecordMergeMode.valueOf(getString(RECORD_MERGE_MODE));
   }
 
   public HoodieRecordMerger getRecordMerger() {
-    List<String> mergers = 
StringUtils.split(getStringOrDefault(RECORD_MERGER_IMPLS), ",").stream()
+    List<String> mergers = StringUtils.split(getString(RECORD_MERGER_IMPLS), 
",").stream()
         .map(String::trim)
         .distinct()
         .collect(Collectors.toList());
-    String recordMergerStrategy = getString(RECORD_MERGER_STRATEGY);
-    return HoodieRecordUtils.createRecordMerger(getString(BASE_PATH), 
engineType, mergers, recordMergerStrategy);
+    return getRecordMerger(getString(BASE_PATH), getRecordMergeMode(),
+        engineType, getLogDataBlockFormat(), mergers, 
getStringOpt(RECORD_MERGER_STRATEGY));
+  }
+
+  public static HoodieRecordMerger getRecordMerger(String basePath,
+                                                   RecordMergeMode mergeMode,
+                                                   EngineType engineType,
+                                                   
HoodieLogBlock.HoodieLogBlockType logBlockType,
+                                                   List<String> mergers,
+                                                   Option<String> strategy) {
+    switch (logBlockType) {
+      case AVRO_DATA_BLOCK:

Review Comment:
   Sg.  Based on our previous discussion, we'll maintain the existing merge 
behavior as much as possible in this PR and tackle the adoption of Spark merger 
and row-based merging everywhere in the follow-ups.



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