Package org.apache.druid.data.input
Class RetryingInputEntity
java.lang.Object
org.apache.druid.data.input.RetryingInputEntity
- All Implemented Interfaces:
InputEntity
- Direct Known Subclasses:
HttpEntity
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.data.input.InputEntity
InputEntity.CleanableFile -
Field Summary
Fields inherited from interface org.apache.druid.data.input.InputEntity
DEFAULT_FETCH_BUFFER_SIZE, DEFAULT_MAX_NUM_FETCH_TRIES, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected abstract StringgetPath()Get path name for this entity, used by the default implementation ofopen()to determine if the underlying stream needs decompressed, based on file extension of the pathopen()Open aRetryingInputStreamwrapper for an underlying input stream, optionally decompressing the retrying stream if the file extension matches a known compression, otherwise passing through the retrying stream directly.protected abstract InputStreamreadFrom(long offset) Directly opens anInputStreamstarting at the given offset on the input entity.protected InputStreamDirectly opens anInputStreamon the input entity.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.data.input.InputEntity
fetch, getRetryCondition, getUri
-
Constructor Details
-
RetryingInputEntity
public RetryingInputEntity()
-
-
Method Details
-
open
Open aRetryingInputStreamwrapper for an underlying input stream, optionally decompressing the retrying stream if the file extension matches a known compression, otherwise passing through the retrying stream directly.- Specified by:
openin interfaceInputEntity- Throws:
IOException- See Also:
-
getMaxRetries
protected int getMaxRetries() -
readFromStart
Directly opens anInputStreamon the input entity. Decompression should be handled externally, and is handled by the default implementation ofopen(), so this should return the raw stream for the object.- Throws:
IOException
-
readFrom
Directly opens anInputStreamstarting at the given offset on the input entity. Decompression should be handled externally, and is handled by the default implementation ofopen(),this should return the raw stream for the object.- Parameters:
offset- an offset to start reading from. A non-negative integer counting the number of bytes from the beginning of the entity- Throws:
IOException
-
getPath
Get path name for this entity, used by the default implementation ofopen()to determine if the underlying stream needs decompressed, based on file extension of the path
-