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 2020/03/25 03:26:15 UTC

[GitHub] [flink] Myasuka commented on a change in pull request #11491: [FLINK-16513][checkpointing] Unaligned checkpoints: checkpoint metadata

Myasuka commented on a change in pull request #11491: [FLINK-16513][checkpointing] Unaligned checkpoints: checkpoint metadata
URL: https://github.com/apache/flink/pull/11491#discussion_r397379698
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java
 ##########
 @@ -640,4 +639,17 @@ private static void checkStateMappingCompleteness(
 
 		return subtaskKeyedStateHandles;
 	}
+
+	private static <T extends AbstractChannelStateHandle<?>> OperatorStateRepartitioner<T> nonRescalingPartitioner(String logStateName) {
+		return (previousParallelSubtaskStates, oldParallelism, newParallelism) -> {
+			Preconditions.checkArgument(
+				oldParallelism == newParallelism ||
+					previousParallelSubtaskStates.stream()
+						.flatMap(s -> s.stream().map(l -> l.getOffsets()))
+						.allMatch(List::isEmpty),
+				String.format("rescaling not supported for %s state (old: %d, %d)", logStateName, oldParallelism, newParallelism));
 
 Review comment:
   ```suggestion
   				String.format("rescaling not supported for %s state (old: %d, new: %d)", logStateName, oldParallelism, newParallelism));
   ```

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