public abstract class CompleteCSVInputPartitioner<OT> extends java.lang.Object implements InputPartitioner<OT,FileInputSplit<OT>>
Modifier and Type | Field and Description |
---|---|
protected Config |
config
Config file required for Hdfs connection
|
protected Path |
filePath
The path to the file that contains the input.
|
protected int |
numSplits
The desired number of splits, as set by the configure() method.
|
static long |
READ_WHOLE_SPLIT_FLAG
The splitLength is set to -1L for reading the whole split.
|
protected FSDataInputStream |
stream
The input data stream
|
Constructor and Description |
---|
CompleteCSVInputPartitioner(Path filePath,
Config cfg) |
CompleteCSVInputPartitioner(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)
It creates the split for the complete file.
|
protected abstract FileInputSplit |
createSplit(int num,
Path file,
long start,
long length,
java.lang.String[] hosts) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputSplitAssigner
protected int numSplits
public static final long READ_WHOLE_SPLIT_FLAG
protected Path filePath
protected Config config
protected FSDataInputStream stream
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
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)