Package org.apache.druid.segment.loading
Class LocalDataSegmentPuller
- java.lang.Object
-
- org.apache.druid.segment.loading.LocalDataSegmentPuller
-
- All Implemented Interfaces:
org.apache.druid.segment.loading.URIDataPuller
- Direct Known Subclasses:
LocalFileTimestampVersionFinder
public class LocalDataSegmentPuller extends Object implements org.apache.druid.segment.loading.URIDataPuller
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_RETRY_COUNT
-
Constructor Summary
Constructors Constructor Description LocalDataSegmentPuller()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FileObjectbuildFileObject(URI uri)InputStreamgetInputStream(URI uri)org.apache.druid.java.util.common.FileUtils.FileCopyResultgetSegmentFiles(File sourceFile, File dir)voidgetSegmentFiles(org.apache.druid.timeline.DataSegment segment, File dir)StringgetVersion(URI uri)Returns the "version" (aka last modified timestamp) of the URI of interestcom.google.common.base.Predicate<Throwable>shouldRetryPredicate()
-
-
-
Field Detail
-
DEFAULT_RETRY_COUNT
public static final int DEFAULT_RETRY_COUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildFileObject
public static FileObject buildFileObject(URI uri)
-
getSegmentFiles
public void getSegmentFiles(org.apache.druid.timeline.DataSegment segment, File dir) throws org.apache.druid.segment.loading.SegmentLoadingException- Throws:
org.apache.druid.segment.loading.SegmentLoadingException
-
getSegmentFiles
public org.apache.druid.java.util.common.FileUtils.FileCopyResult getSegmentFiles(File sourceFile, File dir) throws org.apache.druid.segment.loading.SegmentLoadingException
- Throws:
org.apache.druid.segment.loading.SegmentLoadingException
-
getInputStream
public InputStream getInputStream(URI uri) throws IOException
- Specified by:
getInputStreamin interfaceorg.apache.druid.segment.loading.URIDataPuller- Throws:
IOException
-
getVersion
public String getVersion(URI uri)
Returns the "version" (aka last modified timestamp) of the URI of interest- Specified by:
getVersionin interfaceorg.apache.druid.segment.loading.URIDataPuller- Parameters:
uri- The URI to check the last modified timestamp- Returns:
- The last modified timestamp in ms of the URI in String format
-
shouldRetryPredicate
public com.google.common.base.Predicate<Throwable> shouldRetryPredicate()
- Specified by:
shouldRetryPredicatein interfaceorg.apache.druid.segment.loading.URIDataPuller
-
-