hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java
/**
   * Helper method to scan all hoodie-instant metafiles and construct HoodieInstant objects.
   *
   * @param timelinePath MetaPath where instant files are stored
   * @param includedExtensions Included hoodie extensions
   * @param applyLayoutVersionFilters Depending on Timeline layout version, if there are multiple states for the same
   * action instant, only include the highest state
   * @return List of Hoodie Instants generated
   * @throws IOException in case of failure
   */
Helper method to scan all hoodie-instant metafiles and construct HoodieInstant objects.
Helper method to scan all hoodie - instant metafiles and construct HoodieInstant objects .
public List<HoodieInstant> scanHoodieInstantsFromFileSystem(Path timelinePath, Set<String> includedExtensions,
      boolean applyLayoutVersionFilters) throws IOException {
    Stream<HoodieInstant> instantStream = Arrays.stream(
        HoodieTableMetaClient
            .scanFiles(getFs(), timelinePath, path -> {
              String extension = HoodieInstant.getTimelineFileExtension(path.getName());
              return includedExtensions.contains(extension);
            })).map(HoodieInstant::new);
    if (applyLayoutVersionFilters) {
      instantStream = TimelineLayout.getLayout(getTimelineLayoutVersion()).filterHoodieInstants(instantStream);
    }
    return instantStream.sorted().collect(Collectors.toList());
  }
public List < HoodieInstant > scanHoodieInstantsFromFileSystem ( Path timelinePath , Set < String > includedExtensions , boolean applyLayoutVersionFilters ) throws IOException { Stream < HoodieInstant > instantStream = Arrays . stream ( HoodieTableMetaClient . scanFiles ( getFs ( ) , timelinePath , path -> { String extension = HoodieInstant . getTimelineFileExtension ( path . getName ( ) ) ; return includedExtensions . contains ( extension ) ; } ) ) . map ( HoodieInstant :: new ) ; if ( applyLayoutVersionFilters ) { instantStream = TimelineLayout . getLayout ( getTimelineLayoutVersion ( ) ) . filterHoodieInstants ( instantStream ) ; } return instantStream . sorted ( ) . collect ( Collectors . toList ( ) ) ; }
Helper method to scan all hoodie-instant metafiles and construct HoodieInstant objects.
Helper method to scan all hoodie - instant metafiles and construct HoodieInstant objects .
// Include only the meta files with extensions that needs to be included