StefanRRichter commented on a change in pull request #7711:
[FLINK-11618][state] Refactor operator state repartition mechanism
URL: https://github.com/apache/flink/pull/7711#discussion_r257217609
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java
##########
@@ -355,38 +358,32 @@ private void reDistributePartitionableStates(
}
}
- private void collectPartionableStates(
- List<OperatorState> operatorStates,
- List<List<OperatorStateHandle>> managedOperatorStates,
- List<List<OperatorStateHandle>> rawOperatorStates) {
+ private static void collectPartitionableStates(
+ List<OperatorState> operatorStates,
+ List<List<List<OperatorStateHandle>>> managedOperatorStates,
+ List<List<List<OperatorStateHandle>>> rawOperatorStates) {
for (OperatorState operatorState : operatorStates) {
final int parallelism = operatorState.getParallelism();
-
- List<OperatorStateHandle> managedOperatorState = null;
- List<OperatorStateHandle> rawOperatorState = null;
-
- for (int i = 0; i < parallelism; i++) {
- OperatorSubtaskState operatorSubtaskState =
operatorState.getState(i);
- if (operatorSubtaskState != null) {
-
+ List<List<OperatorStateHandle>> managedOpState = new
ArrayList<>(parallelism);
Review comment:
maybe we can improve the naming by adding `PerSubtasks`, e.g.
`managedOpStatePerSubtasks`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services