zentol commented on a change in pull request #17671:
URL: https://github.com/apache/flink/pull/17671#discussion_r742948330
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveSchedulerClusterITCase.java
##########
@@ -141,6 +158,93 @@ public void testAutomaticScaleUp() throws Exception {
assertTrue(jobResultFuture.join().isSuccess());
}
+ @Test
+ public void testCheckpointStatsPersistedAcrossRescale() throws Exception {
+ final MiniCluster miniCluster = miniClusterResource.getMiniCluster();
+
+ JobVertex jobVertex = new JobVertex("jobVertex", JOB_VERTEX_ID);
+ jobVertex.setInvokableClass(CheckpointingNoOpInvokable.class);
+ jobVertex.setParallelism(PARALLELISM);
+
+ final JobGraph jobGraph =
JobGraphTestUtils.streamingJobGraph(jobVertex);
+ jobGraph.setSnapshotSettings(
+ new JobCheckpointingSettings(
+ CheckpointCoordinatorConfiguration.builder()
+ .setCheckpointInterval(100)
+ .setCheckpointTimeout(1000)
+ .build(),
+ null));
+
+ miniCluster.submitJob(jobGraph).join();
+
+ // wait until some checkpoints have been completed
+ CommonTestUtils.waitUntilCondition(
+ () ->
+ miniCluster
+ .getExecutionGraph(jobGraph.getJobID())
+ .thenApply(
+ eg ->
+ eg.getCheckpointStatsSnapshot()
+ .getCounts()
+
.getNumberOfCompletedCheckpoints()
+ > 0)
+ .get(),
+ Deadline.fromNow(Duration.ofHours(1)));
+
+ miniCluster.terminateTaskManager(0);
+
+ waitUntilParallelismForVertexReached(
+ jobGraph.getJobID(),
+ JOB_VERTEX_ID,
+ NUMBER_SLOTS_PER_TASK_MANAGER * (NUMBER_TASK_MANAGERS - 1));
+
+ // check that the very first checkpoint is still accessible
+ final List<AbstractCheckpointStats> checkpointHistory =
+ miniCluster
+ .getExecutionGraph(jobGraph.getJobID())
+ .thenApply(
+ eg ->
eg.getCheckpointStatsSnapshot().getHistory().getCheckpoints())
+ .get();
+ assertThat(checkpointHistory.get(checkpointHistory.size() -
1).getCheckpointId(), is(1L));
Review comment:
that is correct. I don't know why that is the case, or why this is done
by the tracker and not the rest api though.
--
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]