the-other-tim-brown commented on code in PR #9367:
URL: https://github.com/apache/hudi/pull/9367#discussion_r1285129179


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieBaseFile.java:
##########
@@ -61,16 +62,39 @@ public HoodieBaseFile(String filePath) {
   public HoodieBaseFile(String filePath, BaseFile bootstrapBaseFile) {
     super(filePath);
     this.bootstrapBaseFile = Option.ofNullable(bootstrapBaseFile);
-    String[] fileIdAndCommitTime = getFileIdAndCommitTimeFromFileName();
+    String[] fileIdAndCommitTime = 
getFileIdAndCommitTimeFromFileName(getFileName());
     this.fileId = fileIdAndCommitTime[0];
     this.commitTime = fileIdAndCommitTime[1];
   }
 
+  public HoodieBaseFile(String filePath, String fileId, String commitTime, 
BaseFile bootstrapBaseFile) {
+    super(filePath);
+    this.bootstrapBaseFile = Option.ofNullable(bootstrapBaseFile);
+    this.fileId = fileId;
+    this.commitTime = commitTime;
+  }
+
+  private HoodieBaseFile(FileStatus fileStatus, String[] fileIdAndCommitTime, 
BaseFile bootstrapBaseFile) {
+    this(fileStatus, fileIdAndCommitTime[0], fileIdAndCommitTime[1], 
bootstrapBaseFile);
+  }
+
+  public HoodieBaseFile(FileStatus fileStatus, String fileId, String 
commitTime, BaseFile bootstrapBaseFile) {
+    super(handleExternallyGeneratedFileName(fileStatus, fileId));

Review Comment:
   Ok makes sense, updating the naming and adding a java doc for more clarity 
for future developers



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