org.apache.hadoop.yarn.api.records.impl.pb
Class ContainerPBImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ProtoBase<YarnProtos.ContainerProto>
      extended by org.apache.hadoop.yarn.api.records.impl.pb.ContainerPBImpl
All Implemented Interfaces:
Comparable<Container>, Container

public class ContainerPBImpl
extends ProtoBase<YarnProtos.ContainerProto>
implements Container


Constructor Summary
ContainerPBImpl()
           
ContainerPBImpl(YarnProtos.ContainerProto proto)
           
 
Method Summary
 int compareTo(Container other)
           
 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.
 Priority getPriority()
          Get the Priority at which the Container was allocated.
 YarnProtos.ContainerProto getProto()
           
 Resource getResource()
          Get the Resource allocated to the container.
 ContainerState getState()
          Get the current ContainerState of the container.
 void setContainerStatus(ContainerStatus containerStatus)
           
 void setContainerToken(ContainerToken containerToken)
           
 void setId(ContainerId id)
           
 void setNodeHttpAddress(String nodeHttpAddress)
           
 void setNodeId(NodeId nodeId)
           
 void setPriority(Priority priority)
           
 void setResource(Resource resource)
           
 void setState(ContainerState state)
           
 String toString()
           
 
Methods inherited from class org.apache.hadoop.yarn.api.records.ProtoBase
convertFromProtoFormat, convertToProtoFormat, equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerPBImpl

public ContainerPBImpl()

ContainerPBImpl

public ContainerPBImpl(YarnProtos.ContainerProto proto)
Method Detail

getProto

public YarnProtos.ContainerProto getProto()
Specified by:
getProto in class ProtoBase<YarnProtos.ContainerProto>

getState

public ContainerState getState()
Description copied from interface: Container
Get the current ContainerState of the container.

Specified by:
getState in interface Container
Returns:
current ContainerState of the container

setState

public void setState(ContainerState state)
Specified by:
setState in interface Container

getId

public ContainerId getId()
Description copied from interface: Container
Get the globally unique identifier for the container.

Specified by:
getId in interface Container
Returns:
globally unique identifier for the container

setNodeId

public void setNodeId(NodeId nodeId)
Specified by:
setNodeId in interface Container

getNodeId

public NodeId getNodeId()
Description copied from interface: Container
Get the identifier of the node on which the container is allocated.

Specified by:
getNodeId in interface Container
Returns:
identifier of the node on which the container is allocated

setId

public void setId(ContainerId id)
Specified by:
setId in interface Container

getNodeHttpAddress

public String getNodeHttpAddress()
Description copied from interface: Container
Get the http uri of the node on which the container is allocated.

Specified by:
getNodeHttpAddress in interface Container
Returns:
http uri of the node on which the container is allocated

setNodeHttpAddress

public void setNodeHttpAddress(String nodeHttpAddress)
Specified by:
setNodeHttpAddress in interface Container

getResource

public Resource getResource()
Description copied from interface: Container
Get the Resource allocated to the container.

Specified by:
getResource in interface Container
Returns:
Resource allocated to the container

setResource

public void setResource(Resource resource)
Specified by:
setResource in interface Container

getPriority

public Priority getPriority()
Description copied from interface: Container
Get the Priority at which the Container was allocated.

Specified by:
getPriority in interface Container
Returns:
Priority at which the Container was allocated

setPriority

public void setPriority(Priority priority)
Specified by:
setPriority in interface Container

getContainerToken

public ContainerToken getContainerToken()
Description copied from interface: Container
Get the ContainerToken for the container.

Specified by:
getContainerToken in interface Container
Returns:
ContainerToken for the container

setContainerToken

public void setContainerToken(ContainerToken containerToken)
Specified by:
setContainerToken in interface Container

getContainerStatus

public ContainerStatus getContainerStatus()
Description copied from interface: Container
Get the ContainerStatus of the container.

Specified by:
getContainerStatus in interface Container
Returns:
ContainerStatus of the container

setContainerStatus

public void setContainerStatus(ContainerStatus containerStatus)
Specified by:
setContainerStatus in interface Container

toString

public String toString()
Overrides:
toString in class ProtoBase<YarnProtos.ContainerProto>

compareTo

public int compareTo(Container other)
Specified by:
compareTo in interface Comparable<Container>


Copyright © 2012 Apache Software Foundation. All Rights Reserved.