Class MappingBasedRepartitioner<T>
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.MappingBasedRepartitioner<T>
-
- All Implemented Interfaces:
OperatorStateRepartitioner<T>
@NotThreadSafe public class MappingBasedRepartitioner<T> extends Object implements OperatorStateRepartitioner<T>
A repartitioner that assigns the same channel state to multiple subtasks according to some mapping.The replicated data will then be filtered before processing the record.
Note that channel mappings are cached for the same parallelism changes.
-
-
Constructor Summary
Constructors Constructor Description MappingBasedRepartitioner(RescaleMappings newToOldSubtasksMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<List<T>>
repartitionState(List<List<T>> previousParallelSubtaskStates, int oldParallelism, int newParallelism)
-
-
-
Constructor Detail
-
MappingBasedRepartitioner
public MappingBasedRepartitioner(RescaleMappings newToOldSubtasksMapping)
-
-
Method Detail
-
repartitionState
public List<List<T>> repartitionState(List<List<T>> previousParallelSubtaskStates, int oldParallelism, int newParallelism)
- Specified by:
repartitionState
in interfaceOperatorStateRepartitioner<T>
- Parameters:
previousParallelSubtaskStates
- List with one entry of state handles per parallel subtask of an operator, as they have been checkpointed.oldParallelism
- The parallelism before we start redistribution.newParallelism
- The parallelism that we consider for the state redistribution. Determines the size of the returned list.- Returns:
- List with one entry per parallel subtask. Each subtask receives now one collection of states that build of the new total state for this subtask.
-
-