@Test public void testTerminationAfterJobCompletion() throws Exception { final MiniDispatcher miniDispatcher = createMiniDispatcher(ClusterEntrypoint.ExecutionMode.DETACHED); miniDispatcher.start(); try { dispatcherLeaderElectionService.isLeader(UUID.randomUUID()).get(); jobGraphFuture.get(); resultFuture.complete(archivedExecutionGraph); miniDispatcher.getJobTerminationFuture().get(); } finally { RpcUtils.terminateRpcEndpoint(miniDispatcher, timeout); } }
public CompletableFuture<ApplicationStatus> getJobTerminationFuture() { return jobTerminationFuture; }
MiniDispatcher extends Dispatcher { public CompletableFuture<ApplicationStatus> getJobTerminationFuture() { return jobTerminationFuture; } }
MiniDispatcher extends Dispatcher { public CompletableFuture<ApplicationStatus> getJobTerminationFuture() { return jobTerminationFuture; } MiniDispatcher(
			RpcService rpcService,
			String endpointId,
			Configuration configuration,
			HighAvailabilityServices highAvailabilityServices,
			GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
			BlobServer blobServer,
			HeartbeatServices heartbeatServices,
			JobManagerMetricGroup jobManagerMetricGroup,
			@Nullable String metricQueryServiceAddress,
			ArchivedExecutionGraphStore archivedExecutionGraphStore,
			JobManagerRunnerFactory jobManagerRunnerFactory,
			FatalErrorHandler fatalErrorHandler,
			HistoryServerArchivist historyServerArchivist,
			JobGraph jobGraph,
			JobClusterEntrypoint.ExecutionMode executionMode); }
MiniDispatcher extends Dispatcher { public CompletableFuture<ApplicationStatus> getJobTerminationFuture() { return jobTerminationFuture; } MiniDispatcher(
			RpcService rpcService,
			String endpointId,
			Configuration configuration,
			HighAvailabilityServices highAvailabilityServices,
			GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
			BlobServer blobServer,
			HeartbeatServices heartbeatServices,
			JobManagerMetricGroup jobManagerMetricGroup,
			@Nullable String metricQueryServiceAddress,
			ArchivedExecutionGraphStore archivedExecutionGraphStore,
			JobManagerRunnerFactory jobManagerRunnerFactory,
			FatalErrorHandler fatalErrorHandler,
			HistoryServerArchivist historyServerArchivist,
			JobGraph jobGraph,
			JobClusterEntrypoint.ExecutionMode executionMode); CompletableFuture<ApplicationStatus> getJobTerminationFuture(); @Override CompletableFuture<Acknowledge> submitJob(JobGraph jobGraph, Time timeout); @Override CompletableFuture<JobResult> requestJobResult(JobID jobId, Time timeout); }
MiniDispatcher extends Dispatcher { public CompletableFuture<ApplicationStatus> getJobTerminationFuture() { return jobTerminationFuture; } MiniDispatcher(
			RpcService rpcService,
			String endpointId,
			Configuration configuration,
			HighAvailabilityServices highAvailabilityServices,
			GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
			BlobServer blobServer,
			HeartbeatServices heartbeatServices,
			JobManagerMetricGroup jobManagerMetricGroup,
			@Nullable String metricQueryServiceAddress,
			ArchivedExecutionGraphStore archivedExecutionGraphStore,
			JobManagerRunnerFactory jobManagerRunnerFactory,
			FatalErrorHandler fatalErrorHandler,
			HistoryServerArchivist historyServerArchivist,
			JobGraph jobGraph,
			JobClusterEntrypoint.ExecutionMode executionMode); CompletableFuture<ApplicationStatus> getJobTerminationFuture(); @Override CompletableFuture<Acknowledge> submitJob(JobGraph jobGraph, Time timeout); @Override CompletableFuture<JobResult> requestJobResult(JobID jobId, Time timeout);  }