use of org.apache.flink.api.common.io.NonParallelInput in project flink by apache.
the class NonRichGenericInputFormat method createInputSplits.
@Override
public GenericInputSplit[] createInputSplits(int numSplits) throws IOException {
if (numSplits < 1) {
throw new IllegalArgumentException("Number of input splits has to be at least 1.");
}
numSplits = (this instanceof NonParallelInput) ? 1 : numSplits;
GenericInputSplit[] splits = new GenericInputSplit[numSplits];
for (int i = 0; i < splits.length; i++) {
splits[i] = new GenericInputSplit(i, numSplits);
}
return splits;
}
Aggregations