Class 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
    • Constructor Detail

      • LocalDataSegmentPuller

        public LocalDataSegmentPuller()
    • 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:
        getInputStream in interface org.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:
        getVersion in interface org.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:
        shouldRetryPredicate in interface org.apache.druid.segment.loading.URIDataPuller