Spring for Apache Hadoop

org.springframework.yarn.am
Class StaticAppmaster

java.lang.Object
  extended by org.springframework.yarn.support.LifecycleObjectSupport
      extended by org.springframework.yarn.am.AbstractAppmaster
          extended by org.springframework.yarn.am.AbstractServicesAppmaster
              extended by org.springframework.yarn.am.AbstractProcessingAppmaster
                  extended by org.springframework.yarn.am.StaticAppmaster
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, ContainerLauncherInterceptor, YarnAppmaster

public class StaticAppmaster
extends AbstractProcessingAppmaster
implements YarnAppmaster

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.

Author:
Janne Valkealahti

Constructor Summary
StaticAppmaster()
           
 
Method Summary
protected  void doStart()
          Subclasses may implement this method with the start behavior.
protected  void onInit()
          Global application master instance specific ApplicationAttemptId is build during this init method.
 void submitApplication()
          Submit and run application.
 
Methods inherited from class org.springframework.yarn.am.AbstractProcessingAppmaster
onContainerAllocated, onContainerCompleted, preLaunch
 
Methods inherited from class org.springframework.yarn.am.AbstractServicesAppmaster
getAllocator, getLauncher, getMonitor, setAllocator, setLauncher, setMonitor
 
Methods inherited from class org.springframework.yarn.am.AbstractAppmaster
addAppmasterStateListener, doStop, finishAppmaster, getApplicationAttemptId, getAppmasterClientService, getAppmasterService, getAppmasterTrackService, getCommands, getConfiguration, getContainerAssign, getEnvironment, getParameters, getResourceLocalizer, getTemplate, notifyCompleted, registerAppmaster, setCommands, setCommands, setConfiguration, setContainerAssign, setEnvironment, setFinalApplicationStatus, setParameters, setResourceLocalizer, setTemplate
 
Methods inherited from class org.springframework.yarn.support.LifecycleObjectSupport
afterPropertiesSet, 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

StaticAppmaster

public StaticAppmaster()
Method Detail

submitApplication

public void submitApplication()
Description copied from interface: YarnAppmaster
Submit and run application.

Specified by:
submitApplication in interface YarnAppmaster

onInit

protected void onInit()
               throws java.lang.Exception
Description copied from class: AbstractAppmaster
Global application master instance specific ApplicationAttemptId is build during this init method.

Overrides:
onInit in class AbstractProcessingAppmaster
Throws:
java.lang.Exception
See Also:
LifecycleObjectSupport.onInit()

doStart

protected void doStart()
Description copied from class: LifecycleObjectSupport
Subclasses may implement this method with the start behavior. This method will be invoked while holding the LifecycleObjectSupport.lifecycleLock.

Overrides:
doStart in class LifecycleObjectSupport

Spring for Apache Hadoop