gaoyunhaii commented on a change in pull request #16714:
URL: https://github.com/apache/flink/pull/16714#discussion_r686602800
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/RoundRobinOperatorStateRepartitioner.java
##########
@@ -123,9 +128,28 @@
return mergeMapList;
}
- /** Collect union states from given parallelSubtaskStates. */
private Map<String, List<Tuple2<StreamStateHandle,
OperatorStateHandle.StateMetaInfo>>>
collectUnionStates(List<List<OperatorStateHandle>>
parallelSubtaskStates) {
+ return collectStates(parallelSubtaskStates,
OperatorStateHandle.Mode.UNION);
+ }
+
+ private Map<String, List<Tuple2<StreamStateHandle,
OperatorStateHandle.StateMetaInfo>>>
+ collectPartlyFinishedBroadcastStates(
+ List<List<OperatorStateHandle>> parallelSubtaskStates) {
+ return collectStates(parallelSubtaskStates,
OperatorStateHandle.Mode.BROADCAST).entrySet()
+ .stream()
+ .filter(
+ e ->
+ e.getValue().size() > 0
+ && e.getValue().size() <
parallelSubtaskStates.size())
Review comment:
Here is to check if all the subtasks have reported the state, so we
could filter out the partially finished ones. But the condition here indeed has
some problems and I changed 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]