|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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. |
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
Gets the environment. |
java.lang.String |
getEnvironment(java.lang.String key)
Gets the environment variable. |
java.util.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. |
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 |
setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Sets the environment variables. |
void |
setParameters(java.util.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 YarnContainer
public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
YarnContainer
setEnvironment
in interface YarnContainer
environment
- the environment variablespublic void setParameters(java.util.Properties parameters)
YarnContainer
setParameters
in interface YarnContainer
parameters
- the parameterspublic java.lang.String getEnvironment(java.lang.String key)
key
- the key
null
if key doesn't existpublic java.util.Map<java.lang.String,java.lang.String> getEnvironment()
public java.util.Properties getParameters()
public void addContainerStateListener(ContainerStateListener listener)
LongRunningYarnContainer
addContainerStateListener
in interface LongRunningYarnContainer
listener
- the ContainerStateListener
public boolean isWaitCompleteState()
LongRunningYarnContainer
COMPLETED
state.
isWaitCompleteState
in interface LongRunningYarnContainer
LongRunningYarnContainer.addContainerStateListener(ContainerStateListener)
protected void notifyCompleted()
protected abstract void runInternal()
run()
method.
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |