use of org.apache.flink.client.deployment.application.executors.WebSubmissionExecutorServiceLoader in project flink by apache.
the class DetachedApplicationRunner method tryExecuteJobs.
private List<JobID> tryExecuteJobs(final DispatcherGateway dispatcherGateway, final PackagedProgram program, final Configuration configuration) {
configuration.set(DeploymentOptions.ATTACHED, false);
final List<JobID> applicationJobIds = new ArrayList<>();
final PipelineExecutorServiceLoader executorServiceLoader = new WebSubmissionExecutorServiceLoader(applicationJobIds, dispatcherGateway);
try {
ClientUtils.executeProgram(executorServiceLoader, configuration, program, enforceSingleJobExecution, true);
} catch (ProgramInvocationException e) {
LOG.warn("Could not execute application: ", e);
throw new FlinkRuntimeException("Could not execute application.", e);
}
return applicationJobIds;
}
Aggregations