vinothchandar commented on a change in pull request #3592:
URL: https://github.com/apache/hudi/pull/3592#discussion_r706412642
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/util/CommitUtils.java
##########
@@ -134,4 +136,24 @@ private static HoodieCommitMetadata
buildMetadataFromStats(List<HoodieWriteStat>
}
return fileIdToPath;
}
+
+ /**
+ * Get the Metadata from the latest commit file.
+ * @param metaClient The {@link HoodieTableMetaClient} to get access to the
meta data.
+ * @return An Optional {@link HoodieCommitMetadata} containing the meta data
from the latest commit file.
+ */
+ public static Option<HoodieCommitMetadata>
getCommitMetadataForLatestInstant(HoodieTableMetaClient metaClient) {
+ HoodieTimeline timeline =
metaClient.getActiveTimeline().getCommitsTimeline().filterCompletedInstants();
Review comment:
I added code to filter and keep this to `COMMIT` for COW and
`DELTACOMMIT` for MOR
--
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]