n3nash commented on a change in pull request #2044:
URL: https://github.com/apache/hudi/pull/2044#discussion_r479425785



##########
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:
       getAllExtraMetadataFromActiveTimeline ?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to