AHeise commented on a change in pull request #13735: URL: https://github.com/apache/flink/pull/13735#discussion_r517203045
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java ########## @@ -620,18 +758,112 @@ private static void checkStateMappingCompleteness( chainOpParallelStates, oldParallelism, newParallelism); + } + + static class TaskStateAssignment { + final ExecutionJobVertex executionJobVertex; + final Map<OperatorID, OperatorState> oldState; + final boolean hasState; + final int newParallelism; + final OperatorID inputOperatorID; + final OperatorID outputOperatorID; + + final Map<OperatorInstanceID, List<OperatorStateHandle>> subManagedOperatorState; + final Map<OperatorInstanceID, List<OperatorStateHandle>> subRawOperatorState; + final Map<OperatorInstanceID, List<KeyedStateHandle>> subManagedKeyedState; + final Map<OperatorInstanceID, List<KeyedStateHandle>> subRawKeyedState; + + final Map<OperatorInstanceID, List<InputChannelStateHandle>> inputChannelStates; + final Map<OperatorInstanceID, List<ResultSubpartitionStateHandle>> resultSubpartitionStates; + /** The subpartitions mappings per partition set when the output operator for a partition was rescaled. */ + List<BitSet> outputOperatorInstanceMappings = emptyList(); + /** The input channel mappings per input set when the input operator for a gate was rescaled. */ + List<BitSet> inputOperatorInstanceMappings = emptyList(); + /** The subpartitions mappings of the upstream task per input set when its output operator was rescaled. */ + final Map<Integer, List<BitSet>> upstreamVirtualChannels; + /** The input channel mappings of the downstream task per partition set when its input operator was rescaled. */ + final Map<Integer, List<BitSet>> downStreamVirtualChannels; Review comment: I like it! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org