danny0405 commented on code in PR #7611:
URL: https://github.com/apache/hudi/pull/7611#discussion_r1063037132
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -246,4 +249,20 @@ public static HoodieCommitMetadata getCommitMetadata(
return HoodieCommitMetadata.fromBytes(data, HoodieCommitMetadata.class);
}
}
+
+ /**
+ * Returns the basic commit timeline. For basic we means 'commit' for
COPY_ON_WRITE
+ * and 'delta_commit' for MERGE_ON_READ.
+ */
+ public static HoodieTimeline getBasicCommitTimeline(HoodieTableMetaClient
metaClient) {
+ HoodieTableType tableType = metaClient.getTableType();
+ switch (tableType) {
+ case COPY_ON_WRITE:
+ return
metaClient.getActiveTimeline().getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.COMMIT_ACTION));
+ case MERGE_ON_READ:
+ return
metaClient.getActiveTimeline().getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.DELTA_COMMIT_ACTION));
Review Comment:
We should filter pending instants for the caller.
--
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]