@Test public void testJobFinishedByOther() throws Exception { final JobManagerRunner jobManagerRunner = createJobManagerRunner(); try { jobManagerRunner.start(); final CompletableFuture<ArchivedExecutionGraph> resultFuture = jobManagerRunner.getResultFuture(); assertThat(resultFuture.isDone(), is(false)); jobManagerRunner.jobFinishedByOther(); try { resultFuture.get(); fail("Should have failed."); } catch (ExecutionException ee) { assertThat(ExceptionUtils.stripExecutionException(ee), instanceOf(JobNotFinishedException.class)); } } finally { jobManagerRunner.close(); } }
@Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); }
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } }
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } JobManagerRunner(
			final JobGraph jobGraph,
			final JobMasterServiceFactory jobMasterFactory,
			final HighAvailabilityServices haServices,
			final LibraryCacheManager libraryCacheManager,
			final Executor executor,
			final FatalErrorHandler fatalErrorHandler); }
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } JobManagerRunner(
			final JobGraph jobGraph,
			final JobMasterServiceFactory jobMasterFactory,
			final HighAvailabilityServices haServices,
			final LibraryCacheManager libraryCacheManager,
			final Executor executor,
			final FatalErrorHandler fatalErrorHandler); CompletableFuture<JobMasterGateway> getLeaderGatewayFuture(); JobGraph getJobGraph(); CompletableFuture<ArchivedExecutionGraph> getResultFuture(); void start(); @Override CompletableFuture<Void> closeAsync(); @Override void jobReachedGloballyTerminalState(ArchivedExecutionGraph executionGraph); @Override void jobFinishedByOther(); @Override void jobMasterFailed(Throwable cause); @Override void grantLeadership(final UUID leaderSessionID); @Override void revokeLeadership(); @Override String getAddress(); @Override void handleError(Exception exception); }
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } JobManagerRunner(
			final JobGraph jobGraph,
			final JobMasterServiceFactory jobMasterFactory,
			final HighAvailabilityServices haServices,
			final LibraryCacheManager libraryCacheManager,
			final Executor executor,
			final FatalErrorHandler fatalErrorHandler); CompletableFuture<JobMasterGateway> getLeaderGatewayFuture(); JobGraph getJobGraph(); CompletableFuture<ArchivedExecutionGraph> getResultFuture(); void start(); @Override CompletableFuture<Void> closeAsync(); @Override void jobReachedGloballyTerminalState(ArchivedExecutionGraph executionGraph); @Override void jobFinishedByOther(); @Override void jobMasterFailed(Throwable cause); @Override void grantLeadership(final UUID leaderSessionID); @Override void revokeLeadership(); @Override String getAddress(); @Override void handleError(Exception exception);  }