public abstract class AbstractInputSource extends Object implements InputSource
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()
.TYPE_PROPERTY
Constructor and Description |
---|
AbstractInputSource() |
Modifier and Type | Method and 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 an
InputSourceReader . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTypes, isSplittable, needsFormat
public InputSourceReader reader(InputRowSchema inputRowSchema, @Nullable InputFormat inputFormat, File temporaryDirectory)
InputSource
InputSourceReader
.reader
in interface InputSource
inputRowSchema
- for InputRow
inputFormat
- to parse data. It can be null if InputSource.needsFormat()
= truetemporaryDirectory
- to store temp data. It will be cleaned up automatically once the task is finished.protected InputSourceReader formattableReader(InputRowSchema inputRowSchema, InputFormat inputFormat, File temporaryDirectory)
protected InputSourceReader fixedFormatReader(InputRowSchema inputRowSchema, File temporaryDirectory)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.