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/23 10:29:36 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #10646: [FLINK-15320][runtime] Increment versions of all vertices when failing/canceling/suspending a job

tillrohrmann commented on a change in pull request #10646: [FLINK-15320][runtime] Increment versions of all vertices when failing/canceling/suspending a job
URL: https://github.com/apache/flink/pull/10646#discussion_r360835028
 
 

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultSchedulerTest.java
 ##########
 @@ -550,6 +550,53 @@ public void testInputConstraintALLPerf() throws Exception {
 		assertThat(duration, lessThan(timeout));
 	}
 
+	@Test
+	public void failJobWillIncrementVertexVersions() {
+		final JobGraph jobGraph = singleNonParallelJobVertexJobGraph();
+		final JobVertex onlyJobVertex = getOnlyJobVertex(jobGraph);
+		final ExecutionVertexID onlyExecutionVertexId = new ExecutionVertexID(onlyJobVertex.getID(), 0);
+
+		// suppress restarts so any task failure will lead to job failure
+		testRestartBackoffTimeStrategy.setCanRestart(false);
+		final DefaultScheduler scheduler = createSchedulerAndStartScheduling(jobGraph);
+
+		final ArchivedExecutionVertex archivedExecutionVertex = Iterables.getOnlyElement(scheduler.requestJob().getAllExecutionVertices());
+		final ExecutionAttemptID attemptId = archivedExecutionVertex.getCurrentExecutionAttempt().getAttemptId();
+
+		scheduler.updateTaskExecutionState(new TaskExecutionState(jobGraph.getJobID(), attemptId, ExecutionState.FAILED));
+
+		final ExecutionVertexVersioner executionVertexVersioner = scheduler.getExecutionVertexVersioner();
 
 Review comment:
   Not needed. We can directly access `executionVertexVersioner` as it is a field of this test suite.

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