Class NMContainerStatus
java.lang.Object
org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus
- Direct Known Subclasses:
NMContainerStatusPBImpl
NMContainerStatus includes the current information of a container. This
record is used by YARN only, whereas
ContainerStatus is used both
inside YARN and by end-users.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.apache.hadoop.yarn.api.records.ResourceGet the allocatedResourceof the container.abstract longGet and set the Allocation tags associated with the container.abstract intGet the finalexit statusof the container.abstract org.apache.hadoop.yarn.api.records.ContainerIdGet theContainerIdof the container.abstract org.apache.hadoop.yarn.api.records.ContainerStateabstract longGet the time when the container is created.abstract StringGet the DiagnosticsInfo of the container.org.apache.hadoop.yarn.api.records.ExecutionTypeGet theExecutionTypeof the container.abstract StringGet the node-label-expression in the original ResourceRequest.abstract org.apache.hadoop.yarn.api.records.PriorityGet thePriorityof the request.intstatic NMContainerStatusnewInstance(org.apache.hadoop.yarn.api.records.ContainerId containerId, int version, org.apache.hadoop.yarn.api.records.ContainerState containerState, org.apache.hadoop.yarn.api.records.Resource allocatedResource, String diagnostics, int containerExitStatus, org.apache.hadoop.yarn.api.records.Priority priority, long creationTime) static NMContainerStatusnewInstance(org.apache.hadoop.yarn.api.records.ContainerId containerId, int version, org.apache.hadoop.yarn.api.records.ContainerState containerState, org.apache.hadoop.yarn.api.records.Resource allocatedResource, String diagnostics, int containerExitStatus, org.apache.hadoop.yarn.api.records.Priority priority, long creationTime, String nodeLabelExpression, org.apache.hadoop.yarn.api.records.ExecutionType executionType, long allocationRequestId) abstract voidsetAllocatedResource(org.apache.hadoop.yarn.api.records.Resource resource) abstract voidsetAllocationRequestId(long allocationRequestId) Set the ID corresponding to the original allocation request.voidsetAllocationTags(Set<String> allocationTags) abstract voidsetContainerExitStatus(int containerExitStatus) abstract voidsetContainerId(org.apache.hadoop.yarn.api.records.ContainerId containerId) abstract voidsetContainerState(org.apache.hadoop.yarn.api.records.ContainerState containerState) abstract voidsetCreationTime(long creationTime) abstract voidsetDiagnostics(String diagnostics) voidsetExecutionType(org.apache.hadoop.yarn.api.records.ExecutionType executionType) abstract voidsetNodeLabelExpression(String nodeLabelExpression) abstract voidsetPriority(org.apache.hadoop.yarn.api.records.Priority priority) voidsetVersion(int version)
-
Constructor Details
-
NMContainerStatus
public NMContainerStatus()
-
-
Method Details
-
newInstance
public static NMContainerStatus newInstance(org.apache.hadoop.yarn.api.records.ContainerId containerId, int version, org.apache.hadoop.yarn.api.records.ContainerState containerState, org.apache.hadoop.yarn.api.records.Resource allocatedResource, String diagnostics, int containerExitStatus, org.apache.hadoop.yarn.api.records.Priority priority, long creationTime) -
newInstance
public static NMContainerStatus newInstance(org.apache.hadoop.yarn.api.records.ContainerId containerId, int version, org.apache.hadoop.yarn.api.records.ContainerState containerState, org.apache.hadoop.yarn.api.records.Resource allocatedResource, String diagnostics, int containerExitStatus, org.apache.hadoop.yarn.api.records.Priority priority, long creationTime, String nodeLabelExpression, org.apache.hadoop.yarn.api.records.ExecutionType executionType, long allocationRequestId) -
getContainerId
public abstract org.apache.hadoop.yarn.api.records.ContainerId getContainerId()Get theContainerIdof the container.- Returns:
ContainerIdof the container.
-
setContainerId
public abstract void setContainerId(org.apache.hadoop.yarn.api.records.ContainerId containerId) -
getAllocatedResource
public abstract org.apache.hadoop.yarn.api.records.Resource getAllocatedResource()Get the allocatedResourceof the container.- Returns:
- allocated
Resourceof the container.
-
setAllocatedResource
public abstract void setAllocatedResource(org.apache.hadoop.yarn.api.records.Resource resource) -
getDiagnostics
Get the DiagnosticsInfo of the container.- Returns:
- DiagnosticsInfo of the container
-
setDiagnostics
-
getContainerState
public abstract org.apache.hadoop.yarn.api.records.ContainerState getContainerState() -
setContainerState
public abstract void setContainerState(org.apache.hadoop.yarn.api.records.ContainerState containerState) -
getContainerExitStatus
public abstract int getContainerExitStatus()Get the finalexit statusof the container.- Returns:
- final
exit statusof the container.
-
setContainerExitStatus
public abstract void setContainerExitStatus(int containerExitStatus) -
getPriority
public abstract org.apache.hadoop.yarn.api.records.Priority getPriority()Get thePriorityof the request.- Returns:
Priorityof the request
-
setPriority
public abstract void setPriority(org.apache.hadoop.yarn.api.records.Priority priority) -
getCreationTime
public abstract long getCreationTime()Get the time when the container is created.- Returns:
- CreationTime.
-
setCreationTime
public abstract void setCreationTime(long creationTime) -
getNodeLabelExpression
Get the node-label-expression in the original ResourceRequest.- Returns:
- NodeLabelExpression.
-
setNodeLabelExpression
-
getAllocationRequestId
public abstract long getAllocationRequestId()- Returns:
- the ID corresponding to the original allocation request.
-
setAllocationRequestId
public abstract void setAllocationRequestId(long allocationRequestId) Set the ID corresponding to the original allocation request.- Parameters:
allocationRequestId- the ID corresponding to the original allocation request.
-
getVersion
public int getVersion() -
setVersion
public void setVersion(int version) -
getExecutionType
public org.apache.hadoop.yarn.api.records.ExecutionType getExecutionType()Get theExecutionTypeof the container.- Returns:
ExecutionTypeof the container
-
setExecutionType
public void setExecutionType(org.apache.hadoop.yarn.api.records.ExecutionType executionType) -
getAllocationTags
Get and set the Allocation tags associated with the container.- Returns:
- Allocation tags.
-
setAllocationTags
-