You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "codope (via GitHub)" <gi...@apache.org> on 2023/08/04 15:45:19 UTC
[GitHub] [hudi] codope commented on a diff in pull request #9337: [HUDI-6628] Rely on methods in HoodieBaseFile and HoodieLogFile instead of FSUtils when possible
codope commented on code in PR #9337:
URL: https://github.com/apache/hudi/pull/9337#discussion_r1284582091
##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieBaseFile.java:
##########
@@ -52,14 +61,45 @@ public HoodieBaseFile(String filePath) {
public HoodieBaseFile(String filePath, BaseFile bootstrapBaseFile) {
super(filePath);
this.bootstrapBaseFile = Option.ofNullable(bootstrapBaseFile);
+ String[] fileIdAndCommitTime = getFileIdAndCommitTimeFromFileName();
+ this.fileId = fileIdAndCommitTime[0];
+ this.commitTime = fileIdAndCommitTime[1];
+ }
+
+ /**
+ * Parses the file ID and commit time from the fileName.
+ * @return String array of size 2 with fileId as the first and commitTime as the second element.
+ */
+ private String[] getFileIdAndCommitTimeFromFileName() {
Review Comment:
let's do that when needed.
--
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