public abstract class FixedLengthInputFormat extends FileInputFormat
org.apache.flink.api.common.io.FileInputFormat.AbstractConfigBuilder<T>, org.apache.flink.api.common.io.FileInputFormat.ConfigBuilder, org.apache.flink.api.common.io.FileInputFormat.FileBaseStatistics, org.apache.flink.api.common.io.FileInputFormat.InputSplitOpenThread| Modifier and Type | Field and Description |
|---|---|
static String |
RECORDLENGTH_PARAMETER_KEY
The config parameter which defines the fixed length of a record.
|
| Modifier | Constructor and Description |
|---|---|
protected |
FixedLengthInputFormat()
Constructor only sets the key and value classes
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.flink.configuration.Configuration parameters) |
int |
getReadBufferSize()
Gets the size of the buffer internally used to parse record boundaries.
|
int |
getRecordLength()
Returns the fixed length of a record.
|
org.apache.flink.api.common.io.FileInputFormat.FileBaseStatistics |
getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStats) |
org.apache.flink.types.Record |
nextRecord(org.apache.flink.types.Record reuse) |
void |
open(org.apache.flink.core.fs.FileInputSplit split) |
boolean |
reachedEnd() |
abstract boolean |
readBytes(org.apache.flink.types.Record target,
byte[] buffer,
int startPos)
Reads a record out of the given buffer.
|
acceptFile, close, configureFileFormat, createInputSplits, decorateInputStream, extractFileExtension, getFilePath, getFileStats, getInflaterInputStreamFactory, getInputSplitAssigner, getMinSplitSize, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, registerInflaterInputStreamFactory, setFilePath, setFilePath, setMinSplitSize, setNumSplits, setOpenTimeout, testForUnsplittable, toStringpublic static final String RECORDLENGTH_PARAMETER_KEY
protected FixedLengthInputFormat()
public abstract boolean readBytes(org.apache.flink.types.Record target,
byte[] buffer,
int startPos)
target - The target Recordbuffer - The buffer containing the binary data.startPos - The start position in the byte array.public int getRecordLength()
public int getReadBufferSize()
public void configure(org.apache.flink.configuration.Configuration parameters)
configure in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.types.Record,org.apache.flink.core.fs.FileInputSplit>configure in class org.apache.flink.api.common.io.FileInputFormat<org.apache.flink.types.Record>public void open(org.apache.flink.core.fs.FileInputSplit split)
throws IOException
open in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.types.Record,org.apache.flink.core.fs.FileInputSplit>open in class org.apache.flink.api.common.io.FileInputFormat<org.apache.flink.types.Record>IOExceptionpublic org.apache.flink.api.common.io.FileInputFormat.FileBaseStatistics getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStats)
throws IOException
getStatistics in interface org.apache.flink.api.common.io.InputFormat<org.apache.flink.types.Record,org.apache.flink.core.fs.FileInputSplit>getStatistics in class org.apache.flink.api.common.io.FileInputFormat<org.apache.flink.types.Record>IOExceptionpublic boolean reachedEnd()
public org.apache.flink.types.Record nextRecord(org.apache.flink.types.Record reuse)
throws IOException
IOExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.