Class DetachedApplicationRunner
- java.lang.Object
-
- org.apache.flink.client.deployment.application.DetachedApplicationRunner
-
- All Implemented Interfaces:
ApplicationRunner
@Internal public class DetachedApplicationRunner extends Object implements ApplicationRunner
AnApplicationRunnerwhich runs the user specified application using theEmbeddedExecutor. This runner invokes methods of the providedDispatcherGatewaydirectly, and it does not go through the REST API.In addition, this runner does not wait for the application to finish, but it submits the application in a
DETACHEDmode. As a consequence, applications with jobs that rely on operations like[collect, print, printToErr, count]will fail.
-
-
Constructor Summary
Constructors Constructor Description DetachedApplicationRunner(boolean enforceSingleJobExecution)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.flink.api.common.JobID>run(org.apache.flink.runtime.dispatcher.DispatcherGateway dispatcherGateway, PackagedProgram program, org.apache.flink.configuration.Configuration configuration)Runs the application using the provideddispatcherGateway.
-
-
-
Method Detail
-
run
public List<org.apache.flink.api.common.JobID> run(org.apache.flink.runtime.dispatcher.DispatcherGateway dispatcherGateway, PackagedProgram program, org.apache.flink.configuration.Configuration configuration)
Description copied from interface:ApplicationRunnerRuns the application using the provideddispatcherGateway.- Specified by:
runin interfaceApplicationRunner- Parameters:
dispatcherGateway- the dispatcher of the cluster to run the application.program- thePackagedProgramcontaining the user's main method.configuration- the configuration used to run the application.- Returns:
- a list of the submitted jobs that belong to the provided application.
-
-