@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ContainerLaunchContext extends Object
ContainerLaunchContext represents all of the information
needed by the NodeManager to launch a container.
It includes details such as:
ContainerId of the container.Resource allocated to the container.LocalResource necessary for running the container such
as binaries, jar, shared-objects, side-files etc.
| Constructor and Description |
|---|
ContainerLaunchContext() |
| Modifier and Type | Method and Description |
|---|---|
abstract Map<ApplicationAccessType,String> |
getApplicationACLs()
Get the
ApplicationACLs for the application. |
abstract List<String> |
getCommands()
Get the list of commands for launching the container.
|
abstract ContainerRetryContext |
getContainerRetryContext()
Get the
ContainerRetryContext to relaunch container. |
abstract Map<String,String> |
getEnvironment()
Get environment variables for the container.
|
abstract Map<String,LocalResource> |
getLocalResources()
Get
LocalResource required by the container. |
abstract Map<String,ByteBuffer> |
getServiceData()
Get application-specific binary service data.
|
abstract ByteBuffer |
getTokens()
Get all the tokens needed by this container.
|
abstract ByteBuffer |
getTokensConf()
Get the configuration used by RM to renew tokens.
|
static ContainerLaunchContext |
newInstance(Map<String,LocalResource> localResources,
Map<String,String> environment,
List<String> commands,
Map<String,ByteBuffer> serviceData,
ByteBuffer tokens,
Map<ApplicationAccessType,String> acls) |
static ContainerLaunchContext |
newInstance(Map<String,LocalResource> localResources,
Map<String,String> environment,
List<String> commands,
Map<String,ByteBuffer> serviceData,
ByteBuffer tokens,
Map<ApplicationAccessType,String> acls,
ContainerRetryContext containerRetryContext) |
abstract void |
setApplicationACLs(Map<ApplicationAccessType,String> acls)
Set the
ApplicationACLs for the application. |
abstract void |
setCommands(List<String> commands)
Add the list of commands for launching the container.
|
abstract void |
setContainerRetryContext(ContainerRetryContext containerRetryContext)
Set the
ContainerRetryContext to relaunch container. |
abstract void |
setEnvironment(Map<String,String> environment)
Add environment variables for the container.
|
abstract void |
setLocalResources(Map<String,LocalResource> localResources)
Set
LocalResource required by the container. |
abstract void |
setServiceData(Map<String,ByteBuffer> serviceData)
Set application-specific binary service data.
|
abstract void |
setTokens(ByteBuffer tokens)
Set security tokens needed by this container.
|
abstract void |
setTokensConf(ByteBuffer tokensConf)
Set the configuration used by RM to renew the tokens.
|
@InterfaceAudience.Public @InterfaceStability.Stable public static ContainerLaunchContext newInstance(Map<String,LocalResource> localResources, Map<String,String> environment, List<String> commands, Map<String,ByteBuffer> serviceData, ByteBuffer tokens, Map<ApplicationAccessType,String> acls)
@InterfaceAudience.Public @InterfaceStability.Unstable public static ContainerLaunchContext newInstance(Map<String,LocalResource> localResources, Map<String,String> environment, List<String> commands, Map<String,ByteBuffer> serviceData, ByteBuffer tokens, Map<ApplicationAccessType,String> acls, ContainerRetryContext containerRetryContext)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract ByteBuffer getTokens()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setTokens(ByteBuffer tokens)
tokens - security tokens@InterfaceAudience.Public @InterfaceStability.Unstable public abstract ByteBuffer getTokensConf()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setTokensConf(ByteBuffer tokensConf)
tokensConf - The configuration used by RM to renew the tokens@InterfaceAudience.Public @InterfaceStability.Stable public abstract Map<String,LocalResource> getLocalResources()
LocalResource required by the container.LocalResource required by the container@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setLocalResources(Map<String,LocalResource> localResources)
LocalResource required by the container. All pre-existing
Map entries are cleared before adding the new MaplocalResources - LocalResource required by the container@InterfaceAudience.Public @InterfaceStability.Stable public abstract Map<String,ByteBuffer> getServiceData()
Get application-specific binary service data. This is a map keyed
by the name of each AuxiliaryService that is configured on a
NodeManager and value correspond to the application specific data targeted
for the keyed AuxiliaryService.
This will be used to initialize this application on the specific
AuxiliaryService running on the NodeManager by calling
AuxiliaryService.initializeApplication(ApplicationInitializationContext)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setServiceData(Map<String,ByteBuffer> serviceData)
Set application-specific binary service data. This is a map keyed
by the name of each AuxiliaryService that is configured on a
NodeManager and value correspond to the application specific data targeted
for the keyed AuxiliaryService. All pre-existing Map entries are
preserved.
serviceData - application-specific binary service data@InterfaceAudience.Public @InterfaceStability.Stable public abstract Map<String,String> getEnvironment()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setEnvironment(Map<String,String> environment)
environment - environment variables for the container@InterfaceAudience.Public @InterfaceStability.Stable public abstract List<String> getCommands()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setCommands(List<String> commands)
commands - the list of commands for launching the container@InterfaceAudience.Public @InterfaceStability.Stable public abstract Map<ApplicationAccessType,String> getApplicationACLs()
ApplicationACLs for the application.ApplicationACLs@InterfaceAudience.Public @InterfaceStability.Stable public abstract void setApplicationACLs(Map<ApplicationAccessType,String> acls)
ApplicationACLs for the application. All pre-existing
Map entries are cleared before adding the new Mapacls - ApplicationACLs for the application@InterfaceAudience.Public @InterfaceStability.Unstable public abstract ContainerRetryContext getContainerRetryContext()
ContainerRetryContext to relaunch container.ContainerRetryContext to relaunch container.@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setContainerRetryContext(ContainerRetryContext containerRetryContext)
ContainerRetryContext to relaunch container.containerRetryContext - ContainerRetryContext to
relaunch container.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.