Spring for Apache Hadoop

org.springframework.yarn.am.allocate
Class AbstractAllocator

java.lang.Object
  extended by org.springframework.yarn.support.LifecycleObjectSupport
      extended by org.springframework.yarn.am.allocate.AbstractAllocator
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
Direct Known Subclasses:
AbstractPollingAllocator

public abstract class AbstractAllocator
extends LifecycleObjectSupport

The base class for Container allocator implementations.

Author:
Janne Valkealahti

Constructor Summary
AbstractAllocator()
           
 
Method Summary
 org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
          Gets the application attempt id.
 org.apache.hadoop.conf.Configuration getConfiguration()
          Gets the Yarn configuration.
 java.util.Map<java.lang.String,java.lang.String> getEnvironment()
          Gets the environment.
 AppmasterRmOperations getRmTemplate()
          Gets the rm template.
protected  void onInit()
          Subclasses may implement this for initialization logic.
 void setApplicationAttemptId(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
          Sets the application attempt id.
 void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
          Sets the Yarn configuration.
 void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
          Sets the environment.
 void setRmTemplate(AppmasterRmOperations rmTemplate)
          Sets the rm template.
 
Methods inherited from class org.springframework.yarn.support.LifecycleObjectSupport
afterPropertiesSet, doStart, doStop, 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
 

Constructor Detail

AbstractAllocator

public AbstractAllocator()
Method Detail

onInit

protected void onInit()
               throws java.lang.Exception
Description copied from class: LifecycleObjectSupport
Subclasses may implement this for initialization logic. Called during the InitializingBean phase. Implementor should always call super method not to break initialization chain.

Overrides:
onInit in class LifecycleObjectSupport
Throws:
java.lang.Exception

getApplicationAttemptId

public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
Gets the application attempt id.

Returns:
the application attempt id

setApplicationAttemptId

public void setApplicationAttemptId(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
Sets the application attempt id.

Parameters:
applicationAttemptId - the new application attempt id

getConfiguration

public org.apache.hadoop.conf.Configuration getConfiguration()
Gets the Yarn configuration.

Returns:
the Yarn configuration

setConfiguration

public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the Yarn configuration.

Parameters:
configuration - the new Yarn configuration

getEnvironment

public java.util.Map<java.lang.String,java.lang.String> getEnvironment()
Gets the environment.

Returns:
the environment

setEnvironment

public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Sets the environment.

Parameters:
environment - the environment

setRmTemplate

public void setRmTemplate(AppmasterRmOperations rmTemplate)
Sets the rm template.

Parameters:
rmTemplate - the new rm template

getRmTemplate

public AppmasterRmOperations getRmTemplate()
Gets the rm template.

Returns:
the rm template

Spring for Apache Hadoop