chendonglin521 commented on a change in pull request #15667:
URL: https://github.com/apache/flink/pull/15667#discussion_r616532179



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java
##########
@@ -291,6 +306,33 @@ public boolean shouldBeDiscardedOnShutdown(JobStatus 
jobStatus) {
                        jobStatus == JobStatus.SUSPENDED && 
props.discardOnJobSuspended();
        }
 
+       private Set<StreamStateHandle> getSharedStateHandle() {
+               Set<StreamStateHandle> sharedStateHandles = new 
HashSet<>(operatorStates.size());
+
+               //reference SavepointV2Serializer.serializeKeyedStateHandle
+               operatorStates.values().forEach(operatorState -> {
+                       operatorState.getStates().forEach(operatorSubtaskState 
-> {
+                               if (operatorSubtaskState != null) {
+                                       for (KeyedStateHandle managedKeyedState 
: operatorSubtaskState.getManagedKeyedState()) {
+                                               if (managedKeyedState 
instanceof IncrementalRemoteKeyedStateHandle) {
+                                                       
sharedStateHandles.addAll(((IncrementalRemoteKeyedStateHandle) 
managedKeyedState).getSharedState().values());

Review comment:
       Yes, thanks for your review. I misuse getSharedState method, have 
updated and fixed.




-- 
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


Reply via email to