public class StateAssignmentOperation extends Object
Constructor and Description |
---|
StateAssignmentOperation(org.slf4j.Logger logger,
Map<JobVertexID,ExecutionJobVertex> tasks,
Map<JobVertexID,TaskState> taskStates,
boolean allowNonRestoredState) |
Modifier and Type | Method and Description |
---|---|
boolean |
assignStates() |
static List<KeyGroupRange> |
createKeyGroupPartitions(int numberKeyGroups,
int parallelism)
Groups the available set of key groups into key group partitions.
|
static List<KeyGroupsStateHandle> |
getKeyGroupsStateHandles(Collection<KeyGroupsStateHandle> allKeyGroupsHandles,
KeyGroupRange subtaskKeyGroupIds)
Determine the subset of
KeyGroupsStateHandles with correct
key group index for the given subtask KeyGroupRange . |
public StateAssignmentOperation(org.slf4j.Logger logger, Map<JobVertexID,ExecutionJobVertex> tasks, Map<JobVertexID,TaskState> taskStates, boolean allowNonRestoredState)
public static List<KeyGroupsStateHandle> getKeyGroupsStateHandles(Collection<KeyGroupsStateHandle> allKeyGroupsHandles, KeyGroupRange subtaskKeyGroupIds)
KeyGroupsStateHandles
with correct
key group index for the given subtask KeyGroupRange
.
This is publicly visible to be used in tests.
public static List<KeyGroupRange> createKeyGroupPartitions(int numberKeyGroups, int parallelism)
IMPORTANT: The assignment of key groups to partitions has to be in sync with the KeyGroupStreamPartitioner.
numberKeyGroups
- Number of available key groups (indexed from 0 to numberKeyGroups - 1)parallelism
- Parallelism to generate the key group partitioning forCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.