@Internal public class DetachedApplicationRunner extends Object implements ApplicationRunner
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 and Description |
---|
DetachedApplicationRunner(boolean enforceSingleJobExecution) |
Modifier and Type | Method and Description |
---|---|
List<JobID> |
run(DispatcherGateway dispatcherGateway,
PackagedProgram program,
Configuration configuration)
Runs the application using the provided
dispatcherGateway . |
public DetachedApplicationRunner(boolean enforceSingleJobExecution)
public List<JobID> run(DispatcherGateway dispatcherGateway, PackagedProgram program, Configuration configuration)
ApplicationRunner
dispatcherGateway
.run
in interface ApplicationRunner
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.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.