Package org.apache.flink.api.common.io
Class ReplicatingInputSplitAssigner
- java.lang.Object
-
- org.apache.flink.api.common.io.ReplicatingInputSplitAssigner
-
- All Implemented Interfaces:
InputSplitAssigner
@Internal public class ReplicatingInputSplitAssigner extends Object implements InputSplitAssigner
Assigns each InputSplit to each requesting parallel instance. This causes the input to be fully replicated, i.e., each parallel instance consumes the full input.
-
-
Constructor Summary
Constructors Constructor Description ReplicatingInputSplitAssigner(Collection<InputSplit> splits)ReplicatingInputSplitAssigner(InputSplit[] splits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputSplitgetNextInputSplit(String host, int taskId)Returns the next input split that shall be consumed.voidreturnInputSplit(List<InputSplit> splits, int taskId)Return the splits to assigner if the task failed to process it.
-
-
-
Constructor Detail
-
ReplicatingInputSplitAssigner
public ReplicatingInputSplitAssigner(Collection<InputSplit> splits)
-
ReplicatingInputSplitAssigner
public ReplicatingInputSplitAssigner(InputSplit[] splits)
-
-
Method Detail
-
getNextInputSplit
public InputSplit getNextInputSplit(String host, int taskId)
Description copied from interface:InputSplitAssignerReturns the next input split that shall be consumed. The consumer's host is passed as a parameter to allow localized assignments.- Specified by:
getNextInputSplitin interfaceInputSplitAssigner- Parameters:
host- The host address of split requesting task.taskId- The id of the split requesting task.- Returns:
- the next input split to be consumed, or
nullif no more splits remain.
-
returnInputSplit
public void returnInputSplit(List<InputSplit> splits, int taskId)
Description copied from interface:InputSplitAssignerReturn the splits to assigner if the task failed to process it.- Specified by:
returnInputSplitin interfaceInputSplitAssigner- Parameters:
splits- The list of input splits to be returned.taskId- The id of the task that failed to process the input splits.
-
-