use of org.apache.flink.runtime.jobmaster.JobManagerRunner in project flink by apache.
the class Dispatcher method requestExecutionGraphInfo.
@Override
public CompletableFuture<ExecutionGraphInfo> requestExecutionGraphInfo(JobID jobId, Time timeout) {
Function<Throwable, ExecutionGraphInfo> checkExecutionGraphStoreOnException = throwable -> {
// check whether it is a completed job
final ExecutionGraphInfo executionGraphInfo = executionGraphInfoStore.get(jobId);
if (executionGraphInfo == null) {
throw new CompletionException(ExceptionUtils.stripCompletionException(throwable));
} else {
return executionGraphInfo;
}
};
Optional<JobManagerRunner> maybeJob = getJobManagerRunner(jobId);
return maybeJob.map(job -> job.requestJob(timeout)).orElse(FutureUtils.completedExceptionally(new FlinkJobNotFoundException(jobId))).exceptionally(checkExecutionGraphStoreOnException);
}
Aggregations