Class DetachedApplicationRunner

java.lang.Object
org.apache.flink.client.deployment.application.DetachedApplicationRunner
All Implemented Interfaces:
ApplicationRunner

@Internal public class DetachedApplicationRunner extends Object implements 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
    Constructor
    Description
    DetachedApplicationRunner(boolean enforceSingleJobExecution)
     
  • Method Summary

    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 provided dispatcherGateway.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: ApplicationRunner
      Runs the application using the provided dispatcherGateway.
      Specified by:
      run in interface ApplicationRunner
      Parameters:
      dispatcherGateway - the dispatcher of the cluster to run the application.
      program - the PackagedProgram containing 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.