public abstract class AbstractLauncher extends LifecycleObjectSupport
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractLauncher.ContainerLauncherInterceptorList
Convenient wrapper for interceptor list.
|
Constructor and Description |
---|
AbstractLauncher() |
Modifier and Type | Method and Description |
---|---|
void |
addInterceptor(ContainerLauncherInterceptor interceptor)
Add a service interceptor to the end of the list.
|
protected AppmasterCmOperations |
getCmTemplate(org.apache.hadoop.yarn.api.records.Container container)
Constructs a new
AppmasterCmOperations template. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the Yarn configuration.
|
java.util.Map<java.lang.String,java.lang.String> |
getEnvironment()
Gets the environment.
|
protected AbstractLauncher.ContainerLauncherInterceptorList |
getInterceptors()
Exposes the interceptor list for subclasses.
|
ResourceLocalizer |
getResourceLocalizer()
Gets the resource localizer.
|
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
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 |
setInterceptors(java.util.List<ContainerLauncherInterceptor> interceptors)
Set the list of channel interceptors.
|
void |
setResourceLocalizer(ResourceLocalizer resourceLocalizer)
Sets the resource localizer.
|
afterPropertiesSet, doStart, doStop, getBeanFactory, getPhase, getTaskExecutor, getTaskScheduler, getYarnEventPublisher, isAutoStartup, isRunning, setAutoStartup, setBeanFactory, setPhase, setTaskExecutor, setTaskScheduler, setYarnEventPublisher, start, stop, stop
protected void onInit() throws java.lang.Exception
LifecycleObjectSupport
InitializingBean
phase. Implementor should
always call super method not to break initialization chain.onInit
in class LifecycleObjectSupport
java.lang.Exception
- exceptionpublic org.apache.hadoop.conf.Configuration getConfiguration()
public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration
- the new Yarn configurationpublic java.util.Map<java.lang.String,java.lang.String> getEnvironment()
public void setEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
environment
- the environmentpublic void setResourceLocalizer(ResourceLocalizer resourceLocalizer)
resourceLocalizer
- the new resource localizerpublic ResourceLocalizer getResourceLocalizer()
public void setInterceptors(java.util.List<ContainerLauncherInterceptor> interceptors)
interceptors
- the new interceptorspublic void addInterceptor(ContainerLauncherInterceptor interceptor)
interceptor
- the interceptorprotected AppmasterCmOperations getCmTemplate(org.apache.hadoop.yarn.api.records.Container container)
AppmasterCmOperations
template.container
- the Container
AppmasterCmOperations
templateprotected AbstractLauncher.ContainerLauncherInterceptorList getInterceptors()