public abstract class CSVInputPartitioner<OT> extends java.lang.Object implements InputPartitioner<OT,FileInputSplit<OT>>
Modifier and Type | Field and Description |
---|---|
protected Config |
config |
protected Path |
filePath |
protected int |
numSplits |
Constructor and Description |
---|
CSVInputPartitioner(Path filePath,
Config cfg) |
CSVInputPartitioner(Path filePath,
Config cfg,
int datasize) |
Modifier and Type | Method and Description |
---|---|
void |
configure(Config parameters)
Configures this input format.
|
FileInputSplit<OT>[] |
createInputSplits(int minNumSplits)
Create the input splits
|
protected abstract FileInputSplit |
createSplit(int num,
Path file,
long start,
long length,
java.lang.String[] hosts) |
InputSplitAssigner<OT> |
getInputSplitAssigner(FileInputSplit<OT>[] inputSplits)
Return the input split asigner
|
protected transient int numSplits
protected Path filePath
protected Config config
public void configure(Config parameters)
InputPartitioner
This method is always called first on a newly instantiated input format.
configure
in interface InputPartitioner<OT,FileInputSplit<OT>>
parameters
- The configuration with all parameters
(note: not the Flink config but the TaskConfig).public FileInputSplit<OT>[] createInputSplits(int minNumSplits) throws java.io.IOException
InputPartitioner
createInputSplits
in interface InputPartitioner<OT,FileInputSplit<OT>>
minNumSplits
- Number of minimal input splits, as a hint.java.io.IOException
protected abstract FileInputSplit createSplit(int num, Path file, long start, long length, java.lang.String[] hosts)
public InputSplitAssigner<OT> getInputSplitAssigner(FileInputSplit<OT>[] inputSplits)
InputPartitioner
getInputSplitAssigner
in interface InputPartitioner<OT,FileInputSplit<OT>>
inputSplits
- the input splits to be assigned