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

All Superinterfaces:
Comparable<Container>

@InterfaceAudience.Public
@InterfaceStability.Stable
public interface Container
extends Comparable<Container>

Container represents an allocated resource in the cluster.

The ResourceManager is the sole authority to allocate any Container to applications. The allocated Container is always on a single node and has a unique ContainerId. It has a specific amount of Resource allocated.

It includes details such as:

Typically, an ApplicationMaster receives the Container from the ResourceManager during resource-negotiation and then talks to the NodManager to start/stop containers.

See Also:
AMRMProtocol.allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest), ContainerManager.startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest), ContainerManager.stopContainer(org.apache.hadoop.yarn.api.protocolrecords.StopContainerRequest)

Method Summary
 ContainerStatus getContainerStatus()
          Get the ContainerStatus of the container.
 ContainerToken getContainerToken()
          Get the ContainerToken for the container.
 ContainerId getId()
          Get the globally unique identifier for the container.
 String getNodeHttpAddress()
          Get the http uri of the node on which the container is allocated.
 NodeId getNodeId()
          Get the identifier of the node on which the container is allocated.
 org.apache.hadoop.yarn.api.records.Priority getPriority()
          Get the Priority at which the Container was allocated.
 Resource getResource()
          Get the Resource allocated to the container.
 org.apache.hadoop.yarn.api.records.ContainerState getState()
          Get the current ContainerState of the container.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getId

@InterfaceAudience.Public
@InterfaceStability.Stable
ContainerId getId()
Get the globally unique identifier for the container.

Returns:
globally unique identifier for the container

getNodeId

@InterfaceAudience.Public
@InterfaceStability.Stable
NodeId getNodeId()
Get the identifier of the node on which the container is allocated.

Returns:
identifier of the node on which the container is allocated

getNodeHttpAddress

@InterfaceAudience.Public
@InterfaceStability.Stable
String getNodeHttpAddress()
Get the http uri of the node on which the container is allocated.

Returns:
http uri of the node on which the container is allocated

getResource

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

Returns:
Resource allocated to the container

getPriority

org.apache.hadoop.yarn.api.records.Priority getPriority()
Get the Priority at which the Container was allocated.

Returns:
Priority at which the Container was allocated

getState

@InterfaceAudience.Public
@InterfaceStability.Stable
org.apache.hadoop.yarn.api.records.ContainerState getState()
Get the current ContainerState of the container.

Returns:
current ContainerState of the container

getContainerToken

@InterfaceAudience.Public
@InterfaceStability.Stable
ContainerToken getContainerToken()
Get the ContainerToken for the container.

Returns:
ContainerToken for the container

getContainerStatus

@InterfaceAudience.Public
@InterfaceStability.Stable
ContainerStatus getContainerStatus()
Get the ContainerStatus of the container.

Returns:
ContainerStatus of the container


Copyright © 2013 Apache Software Foundation. All Rights Reserved.