Class DetachedApplicationRunner
java.lang.Object
org.apache.flink.client.deployment.application.DetachedApplicationRunner
- All Implemented Interfaces:
ApplicationRunner
An
ApplicationRunner which runs the user specified application using the EmbeddedExecutor. This runner invokes methods of the provided DispatcherGateway
directly, 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 DETACHED mode. As a consequence, applications with jobs that rely on
operations like [collect, print, printToErr, count] will fail.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<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.
-
Constructor Details
-
DetachedApplicationRunner
public DetachedApplicationRunner(boolean enforceSingleJobExecution)
-
-
Method Details
-
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.
-