Package org.apache.druid.data.input.impl
Class FileEntity
java.lang.Object
org.apache.druid.data.input.impl.FileEntity
- All Implemented Interfaces:
InputEntity
-
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 TypeMethodDescriptionFetches the input entity into the local storage.getFile()getUri()Returns an URI to identify the input entity.open()Opens anInputStreamon the input entity directly.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
getRetryCondition
-
Constructor Details
-
FileEntity
-
-
Method Details
-
fetch
Description copied from interface:InputEntityFetches the input entity into the local storage. This method might be preferred instead ofInputEntity.open(), for example -InputFormatrequires expensive random access on remote storage. - Holding a connection until you consume the entire InputStream is expensive.- Specified by:
fetchin interfaceInputEntity- Parameters:
temporaryDirectory- to store temp data. This directory will be removed automatically once the task finishes.fetchBuffer- is used to fetch remote entity into local storage.- See Also:
-
getUri
Description copied from interface:InputEntityReturns an URI to identify the input entity. Implementations can return null if they don't have an unique URI.- Specified by:
getUriin interfaceInputEntity
-
getFile
-
open
Description copied from interface:InputEntityOpens anInputStreamon the input entity directly. This is the basic way to read the given entity. This method may be called multiple times to re-read the data from the entity.- Specified by:
openin interfaceInputEntity- Throws:
IOException- See Also:
-