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 2023/01/18 20:12:42 UTC

[GitHub] [hudi] alexeykudinkin commented on a diff in pull request #6384: [HUDI-4613] Avoid the use of regex expressions when call hoodieFileGroup#addLogFile function

alexeykudinkin commented on code in PR #6384:
URL: https://github.com/apache/hudi/pull/6384#discussion_r1074027195


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieLogFile.java:
##########
@@ -80,27 +85,42 @@ public HoodieLogFile(String logPathStr) {
   }
 
   public String getFileId() {
-    return FSUtils.getFileIdFromLogPath(getPath());
+    if (fileId == null) {
+      this.fileId = FSUtils.getFileIdFromLogPath(getPath());

Review Comment:
   Instead of running same regex for every component, let's run it once and set all of them at once



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