Search in sources :

Example 6 with ExecutionDeploymentReport

use of org.apache.flink.runtime.taskexecutor.ExecutionDeploymentReport in project flink by apache.

the class DefaultExecutionDeploymentReconcilerTest method testMissingDeployments.

@Test
public void testMissingDeployments() {
    TestingExecutionDeploymentReconciliationHandler handler = new TestingExecutionDeploymentReconciliationHandler();
    DefaultExecutionDeploymentReconciler reconciler = new DefaultExecutionDeploymentReconciler(handler);
    ResourceID resourceId = generate();
    ExecutionAttemptID attemptId = new ExecutionAttemptID();
    reconciler.reconcileExecutionDeployments(resourceId, new ExecutionDeploymentReport(Collections.emptySet()), Collections.singletonMap(attemptId, ExecutionDeploymentState.DEPLOYED));
    assertThat(handler.getUnknownExecutions(), empty());
    assertThat(handler.getMissingExecutions(), hasItem(attemptId));
}
Also used : ExecutionAttemptID(org.apache.flink.runtime.executiongraph.ExecutionAttemptID) ResourceID(org.apache.flink.runtime.clusterframework.types.ResourceID) ExecutionDeploymentReport(org.apache.flink.runtime.taskexecutor.ExecutionDeploymentReport) Test(org.junit.Test)

Example 7 with ExecutionDeploymentReport

use of org.apache.flink.runtime.taskexecutor.ExecutionDeploymentReport in project flink by apache.

the class DefaultExecutionDeploymentReconcilerTest method testMatchingDeployments.

@Test
public void testMatchingDeployments() {
    TestingExecutionDeploymentReconciliationHandler handler = new TestingExecutionDeploymentReconciliationHandler();
    DefaultExecutionDeploymentReconciler reconciler = new DefaultExecutionDeploymentReconciler(handler);
    ResourceID resourceId = generate();
    ExecutionAttemptID attemptId = new ExecutionAttemptID();
    reconciler.reconcileExecutionDeployments(resourceId, new ExecutionDeploymentReport(Collections.singleton(attemptId)), Collections.singletonMap(attemptId, ExecutionDeploymentState.DEPLOYED));
    assertThat(handler.getMissingExecutions(), empty());
    assertThat(handler.getUnknownExecutions(), empty());
}
Also used : ExecutionAttemptID(org.apache.flink.runtime.executiongraph.ExecutionAttemptID) ResourceID(org.apache.flink.runtime.clusterframework.types.ResourceID) ExecutionDeploymentReport(org.apache.flink.runtime.taskexecutor.ExecutionDeploymentReport) Test(org.junit.Test)

Aggregations

ExecutionAttemptID (org.apache.flink.runtime.executiongraph.ExecutionAttemptID)7 ExecutionDeploymentReport (org.apache.flink.runtime.taskexecutor.ExecutionDeploymentReport)7 Test (org.junit.Test)7 ResourceID (org.apache.flink.runtime.clusterframework.types.ResourceID)5 HashSet (java.util.HashSet)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 JobGraph (org.apache.flink.runtime.jobgraph.JobGraph)2 AccumulatorReport (org.apache.flink.runtime.taskexecutor.AccumulatorReport)2 TaskExecutorGateway (org.apache.flink.runtime.taskexecutor.TaskExecutorGateway)2 TaskExecutorToJobManagerHeartbeatPayload (org.apache.flink.runtime.taskexecutor.TaskExecutorToJobManagerHeartbeatPayload)2 TestingTaskExecutorGateway (org.apache.flink.runtime.taskexecutor.TestingTaskExecutorGateway)2 LocalUnresolvedTaskManagerLocation (org.apache.flink.runtime.taskmanager.LocalUnresolvedTaskManagerLocation)2 JobMasterBuilder (org.apache.flink.runtime.jobmaster.utils.JobMasterBuilder)1 Acknowledge (org.apache.flink.runtime.messages.Acknowledge)1