|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.container.AbstractYarnContainer
public abstract class AbstractYarnContainer
Base implementation of YarnContainer providing
some common functionality like environment properties,
command line parameters and handling of the run().
| Constructor Summary | |
|---|---|
AbstractYarnContainer()
|
|
| Method Summary | |
|---|---|
void |
addContainerStateListener(ContainerStateListener listener)
Adds the container state listener. |
Configuration |
getConfiguration()
Gets the Yarn configuration. |
Map<String,String> |
getEnvironment()
Gets the environment. |
String |
getEnvironment(String key)
Gets the environment variable. |
Properties |
getParameters()
Gets the parameters. |
boolean |
isWaitCompleteState()
Indication for possible handler using this bean whether it should wait COMPLETED
state. |
protected void |
notifyCompleted()
Notify completed state to container state listeners. |
protected void |
notifyCompleted(int exit)
Notify completed state to container state listeners. |
protected void |
notifyContainerState(ContainerStateListener.ContainerState state,
Object exit)
Notify state to container state listeners. |
void |
run()
This method is called when something is ran in a container. |
protected abstract void |
runInternal()
Internal method to handle the actual run() method. |
void |
setConfiguration(Configuration configuration)
Sets the Yarn configuration. |
void |
setEnvironment(Map<String,String> environment)
Sets the environment variables. |
void |
setParameters(Properties parameters)
Sets the parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractYarnContainer()
| Method Detail |
|---|
public final void run()
YarnContainer
run in interface YarnContainerpublic void setEnvironment(Map<String,String> environment)
YarnContainer
setEnvironment in interface YarnContainerenvironment - the environment variablespublic void setParameters(Properties parameters)
YarnContainer
setParameters in interface YarnContainerparameters - the parameterspublic Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
configuration - the new Yarn configurationpublic String getEnvironment(String key)
key - the key
null if key doesn't existpublic Map<String,String> getEnvironment()
getEnvironment in interface YarnContainerRuntimepublic Properties getParameters()
getParameters in interface YarnContainerRuntimepublic void addContainerStateListener(ContainerStateListener listener)
LongRunningYarnContainer
addContainerStateListener in interface LongRunningYarnContainerlistener - the ContainerStateListenerpublic boolean isWaitCompleteState()
LongRunningYarnContainerCOMPLETED
state.
isWaitCompleteState in interface LongRunningYarnContainerLongRunningYarnContainer.addContainerStateListener(ContainerStateListener)protected void notifyCompleted()
protected void notifyCompleted(int exit)
exit - the exit
protected void notifyContainerState(ContainerStateListener.ContainerState state,
Object exit)
state - the stateexit - the exitprotected abstract void runInternal()
run() method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||