Class LocalFileTimestampVersionFinder

java.lang.Object
org.apache.druid.segment.loading.LocalDataSegmentPuller
org.apache.druid.segment.loading.LocalFileTimestampVersionFinder
All Implemented Interfaces:
SearchableVersionedDataFinder<URI>, URIDataPuller

public class LocalFileTimestampVersionFinder extends LocalDataSegmentPuller implements SearchableVersionedDataFinder<URI>
  • Field Details

  • Constructor Details

    • LocalFileTimestampVersionFinder

      public LocalFileTimestampVersionFinder()
  • Method Details

    • getLatestVersion

      public URI getLatestVersion(URI uri, @Nullable Pattern pattern)
      Matches based on a pattern in the file name. Returns the file with the latest timestamp.
      Specified by:
      getLatestVersion in interface SearchableVersionedDataFinder<URI>
      Parameters:
      uri - If it is a file, then the parent is searched. If it is a directory, then the directory is searched.
      pattern - The matching filter to down-select the file names in the directory of interest. Passing `null` results in matching any file
      Returns:
      The URI of the most recently modified file which matches the pattern, or `null` if it cannot be found