org.apache.hadoop.yarn.api.records
Interface ContainerLaunchContext


@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ContainerLaunchContext

ContainerLaunchContext represents all of the information needed by the NodeManager to launch a container.

It includes details such as:

See Also:
ContainerManager.startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)

Method Summary
 Map<ApplicationAccessType,String> getApplicationACLs()
          Get the ApplicationACLs for the application.
 List<String> getCommands()
          Get the list of commands for launching the container.
 ContainerId getContainerId()
          Get ContainerId of container to be launched.
 ByteBuffer getContainerTokens()
          Get security tokens (if security is enabled).
 Map<String,String> getEnvironment()
          Get environment variables for the container.
 Map<String,LocalResource> getLocalResources()
          Get LocalResource required by the container.
 Resource getResource()
          Get the Resource allocated to the container by the ResourceManager.
 Map<String,ByteBuffer> getServiceData()
          Get application-specific binary service data.
 String getUser()
          Get the user to whom the container has been allocated.
 void setApplicationACLs(Map<ApplicationAccessType,String> acls)
          Set the ApplicationACLs for the application.
 void setCommands(List<String> commands)
          Add the list of commands for launching the container.
 void setContainerId(ContainerId containerId)
          Set ContainerId of container to be launched.
 void setContainerTokens(ByteBuffer containerToken)
          Set security tokens (if security is enabled).
 void setEnvironment(Map<String,String> environment)
          Add environment variables for the container.
 void setLocalResources(Map<String,LocalResource> localResources)
          Set LocalResource required by the container.
 void setResource(Resource resource)
          Set the Resource allocated to the container by the ResourceManager.
 void setServiceData(Map<String,ByteBuffer> serviceData)
          Set application-specific binary service data.
 void setUser(String user)
          Set the user to whom the container has been allocated
 

Method Detail

getContainerId

@InterfaceAudience.Public
@InterfaceStability.Stable
ContainerId getContainerId()
Get ContainerId of container to be launched.

Returns:
ContainerId of container to be launched

setContainerId

@InterfaceAudience.Public
@InterfaceStability.Stable
void setContainerId(ContainerId containerId)
Set ContainerId of container to be launched.

Parameters:
containerId - et ContainerId of container to be launched

getUser

@InterfaceAudience.Public
@InterfaceStability.Stable
String getUser()
Get the user to whom the container has been allocated.

Returns:
the user to whom the container has been allocated

setUser

@InterfaceAudience.Public
@InterfaceStability.Stable
void setUser(String user)
Set the user to whom the container has been allocated

Parameters:
user - user to whom the container has been allocated

getResource

@InterfaceAudience.Public
@InterfaceStability.Stable
Resource getResource()
Get the Resource allocated to the container by the ResourceManager.

Returns:
Resource allocated to the container by the ResourceManager

setResource

@InterfaceAudience.Public
@InterfaceStability.Stable
void setResource(Resource resource)
Set the Resource allocated to the container by the ResourceManager.

Parameters:
resource - allocated resource

getContainerTokens

@InterfaceAudience.Public
@InterfaceStability.Stable
ByteBuffer getContainerTokens()
Get security tokens (if security is enabled).

Returns:
security tokens (if security is enabled)

setContainerTokens

@InterfaceAudience.Public
@InterfaceStability.Stable
void setContainerTokens(ByteBuffer containerToken)
Set security tokens (if security is enabled).

Parameters:
containerToken - security tokens

getLocalResources

@InterfaceAudience.Public
@InterfaceStability.Stable
Map<String,LocalResource> getLocalResources()
Get LocalResource required by the container.

Returns:
all LocalResource required by the container

setLocalResources

@InterfaceAudience.Public
@InterfaceStability.Stable
void setLocalResources(Map<String,LocalResource> localResources)
Set LocalResource required by the container. All pre-existing Map entries are cleared before adding the new Map

Parameters:
localResources - LocalResource required by the container

getServiceData

@InterfaceAudience.Public
@InterfaceStability.Stable
Map<String,ByteBuffer> getServiceData()
Get application-specific binary service data.

Returns:
application-specific binary service data

setServiceData

@InterfaceAudience.Public
@InterfaceStability.Stable
void setServiceData(Map<String,ByteBuffer> serviceData)
Set application-specific binary service data. All pre-existing Map entries are preserved.

Parameters:
serviceData - application-specific binary service data

getEnvironment

@InterfaceAudience.Public
@InterfaceStability.Stable
Map<String,String> getEnvironment()
Get environment variables for the container.

Returns:
environment variables for the container

setEnvironment

@InterfaceAudience.Public
@InterfaceStability.Stable
void setEnvironment(Map<String,String> environment)
Add environment variables for the container. All pre-existing Map entries are cleared before adding the new Map

Parameters:
environment - environment variables for the container

getCommands

@InterfaceAudience.Public
@InterfaceStability.Stable
List<String> getCommands()
Get the list of commands for launching the container.

Returns:
the list of commands for launching the container

setCommands

@InterfaceAudience.Public
@InterfaceStability.Stable
void setCommands(List<String> commands)
Add the list of commands for launching the container. All pre-existing List entries are cleared before adding the new List

Parameters:
commands - the list of commands for launching the container

getApplicationACLs

@InterfaceAudience.Public
@InterfaceStability.Stable
Map<ApplicationAccessType,String> getApplicationACLs()
Get the ApplicationACLs for the application.

Returns:
all the ApplicationACLs

setApplicationACLs

@InterfaceAudience.Public
@InterfaceStability.Stable
void setApplicationACLs(Map<ApplicationAccessType,String> acls)
Set the ApplicationACLs for the application. All pre-existing Map entries are cleared before adding the new Map

Parameters:
acls - ApplicationACLs for the application


Copyright © 2013 Apache Software Foundation. All Rights Reserved.