Search in sources :

Example 1 with WebSubmissionExecutorServiceLoader

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;
}
Also used : PipelineExecutorServiceLoader(org.apache.flink.core.execution.PipelineExecutorServiceLoader) ArrayList(java.util.ArrayList) FlinkRuntimeException(org.apache.flink.util.FlinkRuntimeException) WebSubmissionExecutorServiceLoader(org.apache.flink.client.deployment.application.executors.WebSubmissionExecutorServiceLoader) ProgramInvocationException(org.apache.flink.client.program.ProgramInvocationException) JobID(org.apache.flink.api.common.JobID)

Aggregations

ArrayList (java.util.ArrayList)1 JobID (org.apache.flink.api.common.JobID)1 WebSubmissionExecutorServiceLoader (org.apache.flink.client.deployment.application.executors.WebSubmissionExecutorServiceLoader)1 ProgramInvocationException (org.apache.flink.client.program.ProgramInvocationException)1 PipelineExecutorServiceLoader (org.apache.flink.core.execution.PipelineExecutorServiceLoader)1 FlinkRuntimeException (org.apache.flink.util.FlinkRuntimeException)1