public interface InputSplit<OT>
extends java.io.Serializable
Input splits are transferred in serialized form via the messages,
so they need to be serializable as defined by Serializable
.
Modifier and Type | Method and Description |
---|---|
void |
close()
Method that marks the end of the life-cycle of an input split.
|
void |
configure(Config parameters)
Configure the split with parameters
|
int |
getSplitNumber()
Returns the number of this input split.
|
OT |
nextRecord(OT reuse)
Reads the next record from the input.
|
void |
open()
Opens a parallel instance of the input format to work on a split.
|
void |
open(Config config) |
boolean |
reachedEnd()
Method used to check if the end of the input is reached.
|
void configure(Config parameters)
parameters
- the parametersint getSplitNumber()
void open() throws java.io.IOException
When this method is called, the input format it guaranteed to be configured.
java.io.IOException
- Thrown, if the spit could not be opened due to an I/O problem.void open(Config config) throws java.io.IOException
java.io.IOException
boolean reachedEnd() throws java.io.IOException
When this method is called, the input format it guaranteed to be opened.
java.io.IOException
- Thrown, if an I/O error occurred.OT nextRecord(OT reuse) throws java.io.IOException
When this method is called, the input format it guaranteed to be opened.
reuse
- Object that may be reused.java.io.IOException
- Thrown, if an I/O error occurred.void close() throws java.io.IOException
When this method is called, the input format it guaranteed to be opened.
java.io.IOException
- Thrown, if the input could not be closed properly.