OT
- The type of the produced records.T
- The type of input split.public interface InputPartitioner<OT,T extends InputSplit<OT>>
extends java.io.Serializable
The input format handles the following:
The life cycle of an input format is the following:
IMPORTANT NOTE: Input formats must be written such that an instance can be opened again after it was closed. That is due to the fact that the input format is used for potentially multiple splits. After a split is done, the format's close function is invoked and, if another split is available, the open function is invoked afterwards for the next split.
//@see BaseStatistics
Modifier and Type | Method and Description |
---|---|
void |
configure(Config parameters)
Configures this input format.
|
T[] |
createInputSplits(int minNumSplits)
Create the input splits
|
InputSplitAssigner<OT> |
getInputSplitAssigner(T[] inputSplits)
Return the input split asigner
|
void configure(Config parameters)
This method is always called first on a newly instantiated input format.
parameters
- The configuration with all parameters
(note: not the Flink config but the TaskConfig).T[] createInputSplits(int minNumSplits) throws java.lang.Exception
minNumSplits
- Number of minimal input splits, as a hint.java.lang.Exception
- if an error occurredInputSplitAssigner<OT> getInputSplitAssigner(T[] inputSplits)
inputSplits
- the input splits to be assigned