public class YarnFlinkApplicationMasterRunner extends AbstractYarnFlinkApplicationMasterRunner implements OnCompletionActions, FatalErrorHandler
The lifetime of the YARN application bound to that of the Flink job. Other
YARN Application Master implementations are for example the YARN session.
It starts actor system and the actors for JobManagerRunner
and YarnResourceManager
.
The JobManagerRunner start a JobMaster
JobMaster handles Flink job execution, while the YarnResourceManager handles container
allocation and failure detection.
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG
Logger
|
appMasterHostname, ENV, INIT_ERROR_EXIT_CODE
Constructor and Description |
---|
YarnFlinkApplicationMasterRunner() |
Modifier and Type | Method and Description |
---|---|
protected RpcService |
createRpcService(Configuration configuration,
String bindAddress,
String portRange) |
void |
jobFailed(Throwable cause)
Job completion notification triggered by JobManager
|
void |
jobFinished(JobExecutionResult result)
Job completion notification triggered by JobManager
|
void |
jobFinishedByOther()
Job completion notification triggered by self
|
static void |
main(String[] args)
The entry point for the YARN application master.
|
void |
onFatalError(Throwable exception) |
protected int |
runApplicationMaster(Configuration config)
The main work method, must run as a privileged action.
|
protected void |
shutdown(ApplicationStatus status,
String msg) |
run
public static void main(String[] args)
args
- The command line arguments.protected int runApplicationMaster(Configuration config)
AbstractYarnFlinkApplicationMasterRunner
runApplicationMaster
in class AbstractYarnFlinkApplicationMasterRunner
protected RpcService createRpcService(Configuration configuration, String bindAddress, String portRange) throws Exception
Exception
protected void shutdown(ApplicationStatus status, String msg)
public void onFatalError(Throwable exception)
onFatalError
in interface FatalErrorHandler
public void jobFinished(JobExecutionResult result)
jobFinished
in interface OnCompletionActions
public void jobFailed(Throwable cause)
jobFailed
in interface OnCompletionActions
public void jobFinishedByOther()
jobFinishedByOther
in interface OnCompletionActions
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.