public class FASTAInputFormat extends eu.stratosphere.api.java.record.io.FileInputFormat
eu.stratosphere.api.common.io.FileInputFormat.AbstractConfigBuilder<T>, eu.stratosphere.api.common.io.FileInputFormat.ConfigBuilder, eu.stratosphere.api.common.io.FileInputFormat.FileBaseStatistics, eu.stratosphere.api.common.io.FileInputFormat.InputSplitOpenThread
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELIMITER_POSITION
The configuration key to set position of the record delimiter. its value is null, prefix or suffix.
|
static java.lang.String |
NUM_STATISTICS_SAMPLES
The configuration key to set the number of samples to take for the statistics.
|
static java.lang.String |
RECORD_DELIMITER
The configuration key to set the record delimiter.
|
static java.lang.String |
SEQUENCE_NUM
The configuration key to set the sequence number.
|
Constructor and Description |
---|
FASTAInputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the input by releasing all buffers and closing the file input stream.
|
void |
configure(eu.stratosphere.configuration.Configuration parameters)
Configures this input format by reading the path to the file from the configuration and the string that
defines the record delimiter.
|
int |
getBufferSize()
Gets the size of the buffer internally used to parse record boundaries.
|
byte[] |
getDelimiter()
Gets the delimiter that defines the record boundaries.
|
eu.stratosphere.api.common.io.FileInputFormat.FileBaseStatistics |
getStatistics(eu.stratosphere.api.common.io.statistics.BaseStatistics cachedStatistics) |
boolean |
nextRecord(eu.stratosphere.types.Record record) |
void |
open(eu.stratosphere.core.fs.FileInputSplit split)
Opens the given input split.
|
boolean |
reachedEnd()
Checks whether the current split is at its end.
|
void |
setBufferSize(int bufferSize)
Sets the size of the buffer to be used to find record boundaries.
|
configureFileFormat, createInputSplits, getFilePath, getFileStats, getInputSplitType, getMinSplitSize, getNumSplits, getOpenTimeout, getSplitLength, getSplitStart, setFilePath, setFilePath, setMinSplitSize, setNumSplits, setOpenTimeout, toString
public static final java.lang.String RECORD_DELIMITER
public static final java.lang.String NUM_STATISTICS_SAMPLES
public static final java.lang.String SEQUENCE_NUM
public static final java.lang.String DELIMITER_POSITION
public FASTAInputFormat()
public byte[] getDelimiter()
public void setBufferSize(int bufferSize)
bufferSize
- The buffer size to use.public int getBufferSize()
public void configure(eu.stratosphere.configuration.Configuration parameters)
configure
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.fs.FileInputSplit>
configure
in class eu.stratosphere.api.common.io.FileInputFormat<eu.stratosphere.types.Record>
parameters
- The configuration object to read the parameters from.public eu.stratosphere.api.common.io.FileInputFormat.FileBaseStatistics getStatistics(eu.stratosphere.api.common.io.statistics.BaseStatistics cachedStatistics)
getStatistics
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.fs.FileInputSplit>
getStatistics
in class eu.stratosphere.api.common.io.FileInputFormat<eu.stratosphere.types.Record>
public void open(eu.stratosphere.core.fs.FileInputSplit split) throws java.io.IOException
open
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.fs.FileInputSplit>
open
in class eu.stratosphere.api.common.io.FileInputFormat<eu.stratosphere.types.Record>
split
- The input split to open.java.io.IOException
eu.stratosphere.pact.common.io.FileInputFormat#open(eu.stratosphere.nephele.fs.FileInputSplit)
public boolean reachedEnd()
public boolean nextRecord(eu.stratosphere.types.Record record) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface eu.stratosphere.api.common.io.InputFormat<eu.stratosphere.types.Record,eu.stratosphere.core.fs.FileInputSplit>
close
in class eu.stratosphere.api.common.io.FileInputFormat<eu.stratosphere.types.Record>
java.io.IOException
- Thrown, if the closing of the file stream causes an I/O error.