Spring for Apache Hadoop

org.springframework.yarn.support
Class YarnContextUtils

java.lang.Object
  extended by org.springframework.yarn.support.YarnContextUtils

public class YarnContextUtils
extends java.lang.Object

Utility methods for accessing common components from the BeanFactory.

Author:
Janne Valkealahti

Field Summary
static java.lang.String CONVERSION_SERVICE_BEAN_NAME
          Default conversion service bean name
static java.lang.String EVALUATION_CONTEXT_BEAN_NAME
          Default evaluation context bean name
static java.lang.String TASK_EXECUTOR_BEAN_NAME
          Default task executor bean name
static java.lang.String TASK_SCHEDULER_BEAN_NAME
          Default task scheduler bean name
 
Constructor Summary
YarnContextUtils()
           
 
Method Summary
static AppmasterService getAppmasterClientService(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the AppmasterService bean whose name is "yarnClientAmservice" if available.
static AppmasterService getAppmasterService(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the AppmasterService bean whose name is "yarnAmservice" if available.
static AppmasterTrackService getAppmasterTrackService(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the AppmasterTrackService bean whose name is "yarnAmTrackservice" if available.
static org.springframework.core.convert.ConversionService getConversionService(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the ConversionService bean whose name is "yarnConversionService" if available.
static org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the StandardEvaluationContext bean whose name is "yarnEvaluationContext" if available.
static YarnEventPublisher getEventPublisher(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the YarnEventPublisher bean whose name is "yarnEventPublisher" if available.
static org.springframework.core.task.TaskExecutor getTaskExecutor(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the TaskScheduler bean whose name is "taskExecutor" if available.
static org.springframework.scheduling.TaskScheduler getTaskScheduler(org.springframework.beans.factory.BeanFactory beanFactory)
          Return the TaskScheduler bean whose name is "taskScheduler" if available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TASK_SCHEDULER_BEAN_NAME

public static final java.lang.String TASK_SCHEDULER_BEAN_NAME
Default task scheduler bean name

See Also:
Constant Field Values

TASK_EXECUTOR_BEAN_NAME

public static final java.lang.String TASK_EXECUTOR_BEAN_NAME
Default task executor bean name

See Also:
Constant Field Values

CONVERSION_SERVICE_BEAN_NAME

public static final java.lang.String CONVERSION_SERVICE_BEAN_NAME
Default conversion service bean name

See Also:
Constant Field Values

EVALUATION_CONTEXT_BEAN_NAME

public static final java.lang.String EVALUATION_CONTEXT_BEAN_NAME
Default evaluation context bean name

See Also:
Constant Field Values
Constructor Detail

YarnContextUtils

public YarnContextUtils()
Method Detail

getTaskScheduler

public static org.springframework.scheduling.TaskScheduler getTaskScheduler(org.springframework.beans.factory.BeanFactory beanFactory)
Return the TaskScheduler bean whose name is "taskScheduler" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.

getTaskExecutor

public static org.springframework.core.task.TaskExecutor getTaskExecutor(org.springframework.beans.factory.BeanFactory beanFactory)
Return the TaskScheduler bean whose name is "taskExecutor" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.

getConversionService

public static org.springframework.core.convert.ConversionService getConversionService(org.springframework.beans.factory.BeanFactory beanFactory)
Return the ConversionService bean whose name is "yarnConversionService" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.
Returns:
The ConversionService bean whose name is "yarnConversionService" if available.

getEvaluationContext

public static org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext(org.springframework.beans.factory.BeanFactory beanFactory)
Return the StandardEvaluationContext bean whose name is "yarnEvaluationContext" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.
Returns:
the instance of StandardEvaluationContext bean whose name is "yarnEvaluationContext" .

getAppmasterService

public static AppmasterService getAppmasterService(org.springframework.beans.factory.BeanFactory beanFactory)
Return the AppmasterService bean whose name is "yarnAmservice" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.

getAppmasterClientService

public static AppmasterService getAppmasterClientService(org.springframework.beans.factory.BeanFactory beanFactory)
Return the AppmasterService bean whose name is "yarnClientAmservice" if available. This bean should be the one providing rpc api for external clients talking to Application Master.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.

getAppmasterTrackService

public static AppmasterTrackService getAppmasterTrackService(org.springframework.beans.factory.BeanFactory beanFactory)
Return the AppmasterTrackService bean whose name is "yarnAmTrackservice" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.

getEventPublisher

public static YarnEventPublisher getEventPublisher(org.springframework.beans.factory.BeanFactory beanFactory)
Return the YarnEventPublisher bean whose name is "yarnEventPublisher" if available.

Parameters:
beanFactory - BeanFactory for lookup, must not be null.

Spring for Apache Hadoop