You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/05 18:41:16 UTC

[GitHub] [flink] Myasuka commented on a change in pull request #9602: [FLINK-13856][checkpoint] Reduce the delete file api when the checkpo…

Myasuka commented on a change in pull request #9602: [FLINK-13856][checkpoint] Reduce the delete file api when the checkpo…
URL: https://github.com/apache/flink/pull/9602#discussion_r354480441
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpoint.java
 ##########
 @@ -281,6 +285,34 @@ private void doDiscard() throws Exception {
 		}
 	}
 
+	private Set<KeyedStateHandle> getIncrementKeyedStates() {
+		Set<KeyedStateHandle> incrementKeyedState = new HashSet<>(operatorStates.size());
+
+		//reference SavepointV2Serializer.serializeKeyedStateHandle
+		operatorStates.values().forEach(operatorState -> {
+			operatorState.getStates().forEach(operatorSubtaskState -> {
+				if (operatorSubtaskState != null && operatorSubtaskState.getManagedKeyedState() != null) {
+					for (KeyedStateHandle managedKeyedState : operatorSubtaskState.getManagedKeyedState()) {
+						if (managedKeyedState instanceof IncrementalRemoteKeyedStateHandle) {
+							incrementKeyedState.add(managedKeyedState);
+						}
+					}
+				}
+
+				if (operatorSubtaskState != null && operatorSubtaskState.getRawKeyedState() != null) {
+					for (KeyedStateHandle rawKeyedState : operatorSubtaskState.getRawKeyedState()) {
+						if (rawKeyedState instanceof IncrementalRemoteKeyedStateHandle) {
 
 Review comment:
   raw keyed state handle cannot be a `IncrementalRemoteKeyedStateHandle`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services