public class HdfsDataSegmentPuller extends Object implements io.druid.segment.loading.DataSegmentPuller, io.druid.segment.loading.URIDataPuller
| Modifier and Type | Class and Description |
|---|---|
static class |
HdfsDataSegmentPuller.HdfsIOException
FileObject.getLastModified and FileObject.delete don't throw IOException.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.conf.Configuration |
config |
static int |
DEFAULT_RETRY_COUNT |
| Constructor and Description |
|---|
HdfsDataSegmentPuller(org.apache.hadoop.conf.Configuration config) |
| Modifier and Type | Method and Description |
|---|---|
static FileObject |
buildFileObject(URI uri,
org.apache.hadoop.conf.Configuration config) |
static FileObject |
buildFileObject(URI uri,
org.apache.hadoop.conf.Configuration config,
Boolean overwrite) |
InputStream |
getInputStream(org.apache.hadoop.fs.Path path) |
InputStream |
getInputStream(URI uri) |
void |
getSegmentFiles(io.druid.timeline.DataSegment segment,
File dir) |
com.metamx.common.FileUtils.FileCopyResult |
getSegmentFiles(org.apache.hadoop.fs.Path path,
File outDir) |
com.metamx.common.FileUtils.FileCopyResult |
getSegmentFiles(URI uri,
File outDir) |
String |
getVersion(URI uri)
Return the "version" (aka last modified timestamp) of the URI
|
com.google.common.base.Predicate<Throwable> |
shouldRetryPredicate() |
public static final int DEFAULT_RETRY_COUNT
protected final org.apache.hadoop.conf.Configuration config
@Inject public HdfsDataSegmentPuller(org.apache.hadoop.conf.Configuration config)
public static FileObject buildFileObject(URI uri, org.apache.hadoop.conf.Configuration config)
public static FileObject buildFileObject(URI uri, org.apache.hadoop.conf.Configuration config, Boolean overwrite)
public void getSegmentFiles(io.druid.timeline.DataSegment segment,
File dir)
throws io.druid.segment.loading.SegmentLoadingException
getSegmentFiles in interface io.druid.segment.loading.DataSegmentPullerio.druid.segment.loading.SegmentLoadingExceptionpublic com.metamx.common.FileUtils.FileCopyResult getSegmentFiles(org.apache.hadoop.fs.Path path,
File outDir)
throws io.druid.segment.loading.SegmentLoadingException
io.druid.segment.loading.SegmentLoadingExceptionpublic com.metamx.common.FileUtils.FileCopyResult getSegmentFiles(URI uri, File outDir) throws io.druid.segment.loading.SegmentLoadingException
io.druid.segment.loading.SegmentLoadingExceptionpublic InputStream getInputStream(org.apache.hadoop.fs.Path path) throws IOException
IOExceptionpublic InputStream getInputStream(URI uri) throws IOException
getInputStream in interface io.druid.segment.loading.URIDataPullerIOExceptionpublic String getVersion(URI uri) throws IOException
getVersion in interface io.druid.segment.loading.URIDataPulleruri - The URI of interestIOExceptionpublic com.google.common.base.Predicate<Throwable> shouldRetryPredicate()
shouldRetryPredicate in interface io.druid.segment.loading.URIDataPullerCopyright © 2011–2015. All rights reserved.