satishkotha commented on a change in pull request #2044:
URL: https://github.com/apache/hudi/pull/2044#discussion_r478620546
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimelineUtils.java
##########
@@ -98,4 +101,31 @@
}).distinct().filter(s -> !s.isEmpty()).collect(Collectors.toList());
}
+
+ /**
+ * Get extra metadata for specified key from latest commit/deltacommit
instant.
+ */
+ public static Option<String>
getExtraMetadataFromLatest(HoodieTableMetaClient metaClient, String
extraMetadataKey) {
+ return
metaClient.getCommitsTimeline().filterCompletedInstants().getReverseOrderedInstants().findFirst().map(instant
->
+ getMetadataValue(metaClient, extraMetadataKey,
instant)).orElse(Option.empty());
+ }
+
+ /**
+ * Get extra metadata for specified key from all active commit/deltacommit
instants.
+ */
+ public static Map<String, Option<String>>
getExtraMetadataTimeline(HoodieTableMetaClient metaClient, String
extraMetadataKey) {
Review comment:
This is primarily for debugging. This helps with seeing how extra
metadata value changed over time. If you have better suggestion for a name,
let me know
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]