suryaprasanna commented on code in PR #18489:
URL: https://github.com/apache/hudi/pull/18489#discussion_r3075814919
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -647,4 +648,19 @@ public static <T> Option<HoodieInstantWriter>
getHoodieInstantWriterOption(Hoodi
}
return writerOption;
}
+
+ @SuppressWarnings("unchecked")
+ public static Option<Pair<String, HoodieCommitMetadata>>
getLatestInstantAndCommitMetadataWithValidCheckpointInfo(
+ HoodieTimeline timeline, String... checkpointKeys) throws IOException {
+ return (Option<Pair<String, HoodieCommitMetadata>>)
timeline.getReverseOrderedInstants().map(instant -> {
+ try {
+ HoodieCommitMetadata commitMetadata =
timeline.readCommitMetadata(instant);
+ boolean hasCheckpointMetadata = Arrays.stream(checkpointKeys)
Review Comment:
This is just a refactoring change no changes with respect to functionality.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -647,4 +647,28 @@ public static <T> Option<HoodieInstantWriter>
getHoodieInstantWriterOption(Hoodi
}
return writerOption;
}
+
+ public static Option<Pair<String, HoodieCommitMetadata>>
getLatestInstantAndCommitMetadataWithValidCheckpointInfo(HoodieTimeline
timeline,
+
String... checkpointKeys) throws
IOException {
+ return (Option<Pair<String, HoodieCommitMetadata>>)
timeline.getReverseOrderedInstants().map(instant -> {
Review Comment:
Added.
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java:
##########
@@ -647,4 +647,28 @@ public static <T> Option<HoodieInstantWriter>
getHoodieInstantWriterOption(Hoodi
}
return writerOption;
}
+
+ public static Option<Pair<String, HoodieCommitMetadata>>
getLatestInstantAndCommitMetadataWithValidCheckpointInfo(HoodieTimeline
timeline,
+
String... checkpointKeys) throws
IOException {
+ return (Option<Pair<String, HoodieCommitMetadata>>)
timeline.getReverseOrderedInstants().map(instant -> {
Review Comment:
This is the same code.
--
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]