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
public abstract class AbstractInputSource extends Object implements InputSource
Abstract class forInputSource
. This class provides a default implementation ofreader(org.apache.druid.data.input.InputRowSchema, org.apache.druid.data.input.InputFormat, java.io.File)
with a sanity check. Child classes should implement one offormattableReader(org.apache.druid.data.input.InputRowSchema, org.apache.druid.data.input.InputFormat, java.io.File)
orfixedFormatReader(org.apache.druid.data.input.InputRowSchema, java.io.File)
depending onInputSource.needsFormat()
.
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.data.input.InputSource
TYPE_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description AbstractInputSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputSourceReader
fixedFormatReader(InputRowSchema inputRowSchema, File temporaryDirectory)
protected InputSourceReader
formattableReader(InputRowSchema inputRowSchema, InputFormat inputFormat, File temporaryDirectory)
InputSourceReader
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, wait
-
Methods inherited from interface org.apache.druid.data.input.InputSource
getTypes, isSplittable, needsFormat
-
-
-
-
Method Detail
-
reader
public InputSourceReader reader(InputRowSchema inputRowSchema, @Nullable InputFormat inputFormat, File temporaryDirectory)
Description copied from interface:InputSource
Creates anInputSourceReader
.- Specified by:
reader
in interfaceInputSource
- Parameters:
inputRowSchema
- forInputRow
inputFormat
- 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)
-
-