public class S3DataSegmentPuller extends Object implements io.druid.segment.loading.DataSegmentPuller, io.druid.segment.loading.URIDataPuller
| Modifier and Type | Class and Description |
|---|---|
protected static class |
S3DataSegmentPuller.S3Coords |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
BUCKET |
static int |
DEFAULT_RETRY_COUNT |
protected static String |
KEY |
protected org.jets3t.service.impl.rest.httpclient.RestS3Service |
s3Client |
static String |
scheme |
| Constructor and Description |
|---|
S3DataSegmentPuller(org.jets3t.service.impl.rest.httpclient.RestS3Service s3Client) |
| Modifier and Type | Method and Description |
|---|---|
static FileObject |
buildFileObject(URI uri,
org.jets3t.service.impl.rest.httpclient.RestS3Service s3Client) |
static URI |
checkURI(URI uri) |
InputStream |
getInputStream(URI uri) |
void |
getSegmentFiles(io.druid.timeline.DataSegment segment,
File outDir) |
com.metamx.common.FileUtils.FileCopyResult |
getSegmentFiles(S3DataSegmentPuller.S3Coords s3Coords,
File outDir) |
String |
getVersion(URI uri)
Returns the "version" (aka last modified timestamp) of the URI
|
com.google.common.base.Predicate<Throwable> |
shouldRetryPredicate() |
public static final int DEFAULT_RETRY_COUNT
public static final String scheme
protected static final String BUCKET
protected static final String KEY
protected final org.jets3t.service.impl.rest.httpclient.RestS3Service s3Client
@Inject public S3DataSegmentPuller(org.jets3t.service.impl.rest.httpclient.RestS3Service s3Client)
public static FileObject buildFileObject(URI uri, org.jets3t.service.impl.rest.httpclient.RestS3Service s3Client) throws org.jets3t.service.S3ServiceException
org.jets3t.service.S3ServiceExceptionpublic void getSegmentFiles(io.druid.timeline.DataSegment segment,
File outDir)
throws io.druid.segment.loading.SegmentLoadingException
getSegmentFiles in interface io.druid.segment.loading.DataSegmentPullerio.druid.segment.loading.SegmentLoadingExceptionpublic com.metamx.common.FileUtils.FileCopyResult getSegmentFiles(S3DataSegmentPuller.S3Coords s3Coords, File outDir) throws io.druid.segment.loading.SegmentLoadingException
io.druid.segment.loading.SegmentLoadingExceptionpublic InputStream getInputStream(URI uri) throws IOException
getInputStream in interface io.druid.segment.loading.URIDataPullerIOExceptionpublic com.google.common.base.Predicate<Throwable> shouldRetryPredicate()
shouldRetryPredicate in interface io.druid.segment.loading.URIDataPullerpublic String getVersion(URI uri) throws IOException
getVersion in interface io.druid.segment.loading.URIDataPulleruri - The URI to check the last timestampIOExceptionCopyright © 2011–2015. All rights reserved.