public abstract class AbstractAppmaster extends LifecycleObjectSupport
| Constructor and Description |
|---|
AbstractAppmaster() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAppmasterStateListener(AppmasterStateListener listener)
Adds the appmaster state listener.
|
protected void |
doStop()
Subclasses may implement this method with the stop behavior.
|
protected FinishApplicationMasterResponse |
finishAppmaster()
Finish appmaster by sending request to resource manager.
|
protected ApplicationAttemptId |
getApplicationAttemptId()
Gets the application attempt id.
|
protected AppmasterService |
getAppmasterClientService()
Gets a client facing
AppmasterService set to this instance. |
protected AppmasterService |
getAppmasterService()
Gets a
AppmasterService set to this instance. |
protected AppmasterTrackService |
getAppmasterTrackService()
Gets a
AppmasterTrackService set to this instance. |
List<String> |
getCommands()
Gets the commands.
|
Configuration |
getConfiguration()
Gets the Yarn configuration.
|
ContainerAssign<Object> |
getContainerAssign()
Gets the container assign.
|
Map<String,String> |
getEnvironment()
Gets the environment variables.
|
Properties |
getParameters()
Gets the parameters.
|
ResourceLocalizer |
getResourceLocalizer()
Gets the resource localizer.
|
AppmasterRmOperations |
getTemplate()
Gets the
AppmasterRmOperations template. |
protected void |
notifyCompleted()
Notify completed state to appmaster state listeners.
|
protected void |
onInit()
Global application master instance specific
ApplicationAttemptId
is build during this init method. |
protected RegisterApplicationMasterResponse |
registerAppmaster()
Register appmaster.
|
void |
setCommands(List<String> commands)
Sets the commands.
|
void |
setCommands(String[] commands)
Sets the commands.
|
void |
setConfiguration(Configuration configuration)
Sets the Yarn configuration.
|
void |
setContainerAssign(ContainerAssign<Object> containerAssign)
Sets the container assign.
|
void |
setEnvironment(Map<String,String> environment)
Sets the environment variables.
|
protected void |
setFinalApplicationStatus(FinalApplicationStatus finalApplicationStatus)
Sets the final application status.
|
void |
setParameters(Properties parameters)
Sets the parameters.
|
void |
setResourceLocalizer(ResourceLocalizer resourceLocalizer)
Sets the resource localizer.
|
void |
setTemplate(AppmasterRmOperations template)
Sets the
AppmasterRmOperations template. |
afterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stopprotected void onInit()
throws Exception
ApplicationAttemptId
is build during this init method.onInit in class LifecycleObjectSupportException - exceptionLifecycleObjectSupport.onInit()protected void doStop()
LifecycleObjectSupportLifecycleObjectSupport.lifecycleLock.doStop in class LifecycleObjectSupportpublic AppmasterRmOperations getTemplate()
AppmasterRmOperations template.AppmasterRmOperations templatepublic void setTemplate(AppmasterRmOperations template)
AppmasterRmOperations template.template - the new AppmasterRmOperations templatepublic Map<String,String> getEnvironment()
public void setEnvironment(Map<String,String> environment)
environment - the environment variablespublic Properties getParameters()
public void setParameters(Properties parameters)
parameters - the new parameterspublic Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
configuration - the new Yarn configurationpublic void setCommands(List<String> commands)
commands - the new commandspublic void setCommands(String[] commands)
commands - the new commandsprotected ApplicationAttemptId getApplicationAttemptId()
public void setResourceLocalizer(ResourceLocalizer resourceLocalizer)
resourceLocalizer - the new resource localizerpublic ResourceLocalizer getResourceLocalizer()
public void addAppmasterStateListener(AppmasterStateListener listener)
listener - the listenerpublic ContainerAssign<Object> getContainerAssign()
public void setContainerAssign(ContainerAssign<Object> containerAssign)
containerAssign - the new container assignprotected void setFinalApplicationStatus(FinalApplicationStatus finalApplicationStatus)
finalApplicationStatus - the new final application statusprotected void notifyCompleted()
protected AppmasterService getAppmasterService()
AppmasterService set to this instance.AppmasterServiceprotected AppmasterService getAppmasterClientService()
AppmasterService set to this instance.AppmasterServiceprotected AppmasterTrackService getAppmasterTrackService()
AppmasterTrackService set to this instance.AppmasterTrackServiceprotected RegisterApplicationMasterResponse registerAppmaster()
protected FinishApplicationMasterResponse finishAppmaster()
FinalApplicationStatus.SUCCEEDED which
can be changed using method setFinalApplicationStatus(FinalApplicationStatus).