use of org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID in project flink by apache.
the class DefaultSchedulerTest method failJobWillIncrementVertexVersions.
@Test
public void failJobWillIncrementVertexVersions() {
final JobGraph jobGraph = singleNonParallelJobVertexJobGraph();
final JobVertex onlyJobVertex = getOnlyJobVertex(jobGraph);
final ExecutionVertexID onlyExecutionVertexId = new ExecutionVertexID(onlyJobVertex.getID(), 0);
final DefaultScheduler scheduler = createSchedulerAndStartScheduling(jobGraph);
final ExecutionVertexVersion executionVertexVersion = executionVertexVersioner.getExecutionVertexVersion(onlyExecutionVertexId);
scheduler.failJob(new FlinkException("Test failure."), System.currentTimeMillis());
assertTrue(executionVertexVersioner.isModified(executionVertexVersion));
}
use of org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID in project flink by apache.
the class DefaultSchedulerTest method releaseSlotIfVertexVersionOutdated.
@Test
public void releaseSlotIfVertexVersionOutdated() {
testExecutionSlotAllocator.disableAutoCompletePendingRequests();
final JobGraph jobGraph = singleNonParallelJobVertexJobGraph();
final ExecutionVertexID onlyExecutionVertexId = new ExecutionVertexID(getOnlyJobVertex(jobGraph).getID(), 0);
createSchedulerAndStartScheduling(jobGraph);
executionVertexVersioner.recordModification(onlyExecutionVertexId);
testExecutionSlotAllocator.completePendingRequests();
assertThat(testExecutionSlotAllocator.getReturnedSlots(), hasSize(1));
}
use of org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID in project flink by apache.
the class DefaultSchedulerTest method suspendJobWillIncrementVertexVersions.
@Test
public void suspendJobWillIncrementVertexVersions() throws Exception {
final JobGraph jobGraph = singleNonParallelJobVertexJobGraph();
final JobVertex onlyJobVertex = getOnlyJobVertex(jobGraph);
final ExecutionVertexID onlyExecutionVertexId = new ExecutionVertexID(onlyJobVertex.getID(), 0);
final DefaultScheduler scheduler = createSchedulerAndStartScheduling(jobGraph);
final ExecutionVertexVersion executionVertexVersion = executionVertexVersioner.getExecutionVertexVersion(onlyExecutionVertexId);
scheduler.close();
assertTrue(executionVertexVersioner.isModified(executionVertexVersion));
}
use of org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID in project flink by apache.
the class DefaultSchedulerTest method cancelJobWillIncrementVertexVersions.
@Test
public void cancelJobWillIncrementVertexVersions() {
final JobGraph jobGraph = singleNonParallelJobVertexJobGraph();
final JobVertex onlyJobVertex = getOnlyJobVertex(jobGraph);
final ExecutionVertexID onlyExecutionVertexId = new ExecutionVertexID(onlyJobVertex.getID(), 0);
final DefaultScheduler scheduler = createSchedulerAndStartScheduling(jobGraph);
final ExecutionVertexVersion executionVertexVersion = executionVertexVersioner.getExecutionVertexVersion(onlyExecutionVertexId);
scheduler.cancel();
assertTrue(executionVertexVersioner.isModified(executionVertexVersion));
}
use of org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID in project flink by apache.
the class DefaultSchedulerTest method startScheduling.
@Test
public void startScheduling() {
final JobGraph jobGraph = singleNonParallelJobVertexJobGraph();
final JobVertex onlyJobVertex = getOnlyJobVertex(jobGraph);
createSchedulerAndStartScheduling(jobGraph);
final List<ExecutionVertexID> deployedExecutionVertices = testExecutionVertexOperations.getDeployedVertices();
final ExecutionVertexID executionVertexId = new ExecutionVertexID(onlyJobVertex.getID(), 0);
assertThat(deployedExecutionVertices, contains(executionVertexId));
}
Aggregations