Package org.apache.druid.segment.loading
Class LocalFileTimestampVersionFinder
- java.lang.Object
-
- org.apache.druid.segment.loading.LocalDataSegmentPuller
-
- org.apache.druid.segment.loading.LocalFileTimestampVersionFinder
-
- All Implemented Interfaces:
org.apache.druid.data.SearchableVersionedDataFinder<URI>,org.apache.druid.segment.loading.URIDataPuller
public class LocalFileTimestampVersionFinder extends LocalDataSegmentPuller implements org.apache.druid.data.SearchableVersionedDataFinder<URI>
-
-
Field Summary
Fields Modifier and Type Field Description static StringURI_SCHEME-
Fields inherited from class org.apache.druid.segment.loading.LocalDataSegmentPuller
DEFAULT_RETRY_COUNT
-
-
Constructor Summary
Constructors Constructor Description LocalFileTimestampVersionFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URIgetLatestVersion(URI uri, Pattern pattern)Matches based on a pattern in the file name.-
Methods inherited from class org.apache.druid.segment.loading.LocalDataSegmentPuller
buildFileObject, getInputStream, getSegmentFiles, getSegmentFiles, getVersion, shouldRetryPredicate
-
-
-
-
Field Detail
-
URI_SCHEME
public static final String URI_SCHEME
- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
getLatestVersionin interfaceorg.apache.druid.data.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
-
-