T - the data typepublic abstract class AbstractTextStreamFormat<T> extends ConfigurableBinaryStreamFormat<T>
| Constructor and Description |
|---|
AbstractTextStreamFormat() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterInput(T model,
StringOption path,
TextInput<T> input)
Processes the data object, which has filled the current record data.
|
protected void |
beforeOutput(T model,
StringOption path,
TextOutput<T> output)
Process the data object.
|
ModelInput<T> |
createInput(Class<? extends T> dataType,
String path,
InputStream stream,
long offset,
long fragmentSize)
Creates a new
ModelInput for the specified properties. |
ModelOutput<T> |
createOutput(Class<? extends T> dataType,
String path,
OutputStream stream)
Creates a new
ModelOutput for the specified properties. |
protected abstract RecordDefinition<T> |
createRecordDefinition()
Returns the
RecordDefinition. |
protected abstract TextFormat |
createTextFormat()
Returns the
TextFormat. |
protected Class<? extends org.apache.hadoop.io.compress.CompressionCodec> |
getCompressionCodecClass()
Returns the compression codec class.
|
protected InputSplitter |
getInputSplitter()
Returns the input splitter of this format.
|
long |
getMinimumFragmentSize()
Returns the lower limit of fragment size (in bytes).
|
long |
getPreferredFragmentSize()
Returns the preferred fragment size (in bytes).
|
RecordDefinition<T> |
getRecordDefinition()
Returns the
RecordDefinition. |
TextFormat |
getTextFormat()
Returns the
TextFormat. |
getConf, setConfcreateInputclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedTypeprotected abstract TextFormat createTextFormat()
TextFormat.protected abstract RecordDefinition<T> createRecordDefinition()
RecordDefinition.protected InputSplitter getInputSplitter()
null is input split is disabledprotected Class<? extends org.apache.hadoop.io.compress.CompressionCodec> getCompressionCodecClass()
null if compression is disabledprotected void afterInput(T model, StringOption path, TextInput<T> input)
model - the data objectpath - the current input pathinput - the current inputprotected void beforeOutput(T model, StringOption path, TextOutput<T> output)
model - the data objectpath - the current output pathoutput - the current outputpublic final TextFormat getTextFormat()
TextFormat.public final RecordDefinition<T> getRecordDefinition()
RecordDefinition.public final long getPreferredFragmentSize()
FragmentableDataFormat-1 as infinitepublic final long getMinimumFragmentSize()
FragmentableDataFormat-1 as infinite (never split into fragments)public ModelInput<T> createInput(Class<? extends T> dataType, String path, InputStream stream, long offset, long fragmentSize) throws IOException, InterruptedException
BinaryStreamFormatModelInput for the specified properties.createInput in class BinaryStreamFormat<T>dataType - the target data typepath - the path about the target stream (for label)stream - the target streamoffset - starting stream offsetfragmentSize - suggested fragment bytes count, or -1 as infiniteIOException - if failed to create readerInterruptedException - if interruptedpublic ModelOutput<T> createOutput(Class<? extends T> dataType, String path, OutputStream stream) throws IOException, InterruptedException
BinaryStreamFormatModelOutput for the specified properties.createOutput in class BinaryStreamFormat<T>dataType - the target data typepath - the path about the target stream (for label)stream - the target streamIOException - if failed to create writerInterruptedException - if interruptedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.