public final class DriverLauncher extends Object
It can be instantiated using a configuration that can create a REEF instance. For example, the local resourcemanager and the YARN resourcemanager can do this.
See org.apache.reef.examples.hello
package for a demo use case.
Modifier and Type | Class and Description |
---|---|
class |
DriverLauncher.CompletedJobHandler
Job driver notifies us that the job had completed successfully.
|
class |
DriverLauncher.FailedJobHandler
Job driver notifies us that the job had failed.
|
class |
DriverLauncher.RunningJobHandler
Job driver notifies us that the job is running.
|
class |
DriverLauncher.RuntimeErrorHandler
Handler an error in the job driver.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Kills the running job.
|
static DriverLauncher |
getLauncher(Configuration runtimeConfiguration)
Instantiate a launcher for the given Configuration.
|
LauncherStatus |
getStatus() |
LauncherStatus |
run(Configuration driverConfig)
Run a job.
|
LauncherStatus |
run(Configuration driverConfig,
long timeOut)
Run a job with a waiting timeout after which it will be killed, if it did not complete yet.
|
void |
setStatusAndNotify(LauncherStatus status)
Update job status and notify the waiting thread.
|
String |
toString() |
public static DriverLauncher getLauncher(Configuration runtimeConfiguration) throws BindException, InjectionException
runtimeConfiguration
- the resourcemanager configuration to be usedBindException
- on configuration errorsInjectionException
- on configuration errorspublic void close()
public LauncherStatus run(Configuration driverConfig)
driverConfig
- the configuration for the driver. See DriverConfiguration for details.public LauncherStatus run(Configuration driverConfig, long timeOut)
driverConfig
- the configuration for the driver. See DriverConfiguration for details.timeOut
- timeout on the job.public LauncherStatus getStatus()
public void setStatusAndNotify(LauncherStatus status)
Copyright © 2016 The Apache Software Foundation. All rights reserved.