Package org.apache.druid.data.input
Class AbstractInputSource
java.lang.Object
org.apache.druid.data.input.AbstractInputSource
- All Implemented Interfaces:
InputSource
- Direct Known Subclasses:
CloudObjectInputSource,CombiningInputSource,HttpInputSource,InlineInputSource,LocalInputSource
Abstract class for
InputSource. This class provides a default implementation of reader(org.apache.druid.data.input.InputRowSchema, org.apache.druid.data.input.InputFormat, java.io.File) with
a sanity check. Child classes should implement one of formattableReader(org.apache.druid.data.input.InputRowSchema, org.apache.druid.data.input.InputFormat, java.io.File) or fixedFormatReader(org.apache.druid.data.input.InputRowSchema, java.io.File)
depending on InputSource.needsFormat().-
Field Summary
Fields inherited from interface org.apache.druid.data.input.InputSource
TYPE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InputSourceReaderfixedFormatReader(InputRowSchema inputRowSchema, File temporaryDirectory) protected InputSourceReaderformattableReader(InputRowSchema inputRowSchema, InputFormat inputFormat, File temporaryDirectory) reader(InputRowSchema inputRowSchema, InputFormat inputFormat, File temporaryDirectory) Creates anInputSourceReader.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.InputSource
getTypes, isSplittable, needsFormat
-
Constructor Details
-
AbstractInputSource
public AbstractInputSource()
-
-
Method Details
-
reader
public InputSourceReader reader(InputRowSchema inputRowSchema, @Nullable InputFormat inputFormat, File temporaryDirectory) Description copied from interface:InputSourceCreates anInputSourceReader.- Specified by:
readerin interfaceInputSource- Parameters:
inputRowSchema- forInputRowinputFormat- to parse data. It can be null ifInputSource.needsFormat()= truetemporaryDirectory- to store temp data. It will be cleaned up automatically once the task is finished.
-
formattableReader
protected InputSourceReader formattableReader(InputRowSchema inputRowSchema, InputFormat inputFormat, File temporaryDirectory) -
fixedFormatReader
protected InputSourceReader fixedFormatReader(InputRowSchema inputRowSchema, File temporaryDirectory)
-