You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/11/04 11:55:52 UTC

[GitHub] [hudi] xushiyan commented on a diff in pull request #7042: [HUDI-5082] Improve the cdc log file name format

xushiyan commented on code in PR #7042:
URL: https://github.com/apache/hudi/pull/7042#discussion_r1013933825


##########
hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java:
##########
@@ -355,11 +356,19 @@ public static String createNewFileId(String idPfx, int id) {
     return String.format("%s-%d", idPfx, id);
   }
 
+  private static String extractCommonLogFileName(String fileName) {
+    if (fileName.endsWith(HoodieCDCUtils.CDC_LOGFILE_SUFFIX)) {
+      return fileName.substring(0, fileName.length() - HoodieCDCUtils.CDC_LOGFILE_SUFFIX.length());
+    }
+    return fileName;

Review Comment:
   not a big fan of having a special handling of cdc filenames. can we fix regex alone to achieve it?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org