|
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.support.LifecycleObjectSupport org.springframework.yarn.am.AbstractAppmaster org.springframework.yarn.am.AbstractServicesAppmaster org.springframework.yarn.am.AbstractEventingAppmaster org.springframework.yarn.am.StaticEventingAppmaster
public class StaticEventingAppmaster
A simple application master implementation which will allocate and launch a number of containers, monitor container statuses and finally exit the application by sending corresponding message back to resource manager. This implementation also is able to handle failed containers.
Constructor Summary | |
---|---|
StaticEventingAppmaster()
|
Method Summary | |
---|---|
protected boolean |
isComplete()
Returns state telling if application is considered as complete. |
protected void |
onContainerAllocated(org.apache.hadoop.yarn.api.records.Container container)
Invoked when ContainerAllocationEvent is received as an
application event. |
protected void |
onContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerStatus status)
Invoked when ContainerCompletedEvent is received as an
application event. |
protected boolean |
onContainerFailed(org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
Called if completed container has failed. |
protected void |
onContainerLaunched(org.apache.hadoop.yarn.api.records.Container container)
Invoked when ContainerLaunchedEvent is received as an
application event. |
void |
submitApplication()
Submit and run application. |
Methods inherited from class org.springframework.yarn.am.AbstractEventingAppmaster |
---|
onApplicationEvent, onContainerLaunchRequestFailed |
Methods inherited from class org.springframework.yarn.am.AbstractServicesAppmaster |
---|
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitor |
Methods inherited from class org.springframework.yarn.support.LifecycleObjectSupport |
---|
afterPropertiesSet, doStart, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.yarn.am.YarnAppmaster |
---|
addAppmasterStateListener, setEnvironment, setParameters |
Constructor Detail |
---|
public StaticEventingAppmaster()
Method Detail |
---|
public void submitApplication()
YarnAppmaster
submitApplication
in interface YarnAppmaster
protected void onContainerAllocated(org.apache.hadoop.yarn.api.records.Container container)
AbstractEventingAppmaster
ContainerAllocationEvent
is received as an
application event. Wrapped Container
is passed to a method.
onContainerAllocated
in class AbstractEventingAppmaster
container
- the containerprotected void onContainerLaunched(org.apache.hadoop.yarn.api.records.Container container)
AbstractEventingAppmaster
ContainerLaunchedEvent
is received as an
application event. Wrapped Container
is passed to a method.
onContainerLaunched
in class AbstractEventingAppmaster
container
- the containerprotected void onContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerStatus status)
AbstractEventingAppmaster
ContainerCompletedEvent
is received as an
application event. Wrapped ContainerStatus
is passed to a method.
onContainerCompleted
in class AbstractEventingAppmaster
status
- the container statusprotected boolean onContainerFailed(org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
Default implementation doesn't do anything and just returns that failed container wasn't handled.
containerStatus
- the container status
protected boolean isComplete()
ContainerMonitor.completedCount()
.
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |