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:
SearchableVersionedDataFinder<URI>,URIDataPuller
public class LocalFileTimestampVersionFinder
extends LocalDataSegmentPuller
implements SearchableVersionedDataFinder<URI>
-
Field Summary
FieldsFields inherited from class org.apache.druid.segment.loading.LocalDataSegmentPuller
DEFAULT_RETRY_COUNT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLatestVersion(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, getVersion, shouldRetryPredicate
-
Field Details
-
URI_SCHEME
- See Also:
-
-
Constructor Details
-
LocalFileTimestampVersionFinder
public LocalFileTimestampVersionFinder()
-
-
Method Details
-
getLatestVersion
Matches based on a pattern in the file name. Returns the file with the latest timestamp.- Specified by:
getLatestVersionin interfaceSearchableVersionedDataFinder<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
-