@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ContainerStatus extends Object
ContainerStatus
represents the current status of a
Container
.
It provides details such as:
ContainerId
of the container.ExecutionType
of the container.ContainerState
of the container.Resource
allocated to the container.Constructor and Description |
---|
ContainerStatus() |
Modifier and Type | Method and Description |
---|---|
Resource |
getCapability()
Get the
Resource allocated to the container. |
abstract ContainerId |
getContainerId()
Get the
ContainerId of the container. |
ContainerSubState |
getContainerSubState()
Get Extra state information of the container (SCHEDULED, LOCALIZING etc.).
|
abstract String |
getDiagnostics()
Get diagnostic messages for failed containers.
|
ExecutionType |
getExecutionType()
Get the
ExecutionType of the container. |
abstract int |
getExitStatus()
Get the exit status for the container.
|
String |
getExposedPorts()
Get exposed ports of the container.
|
String |
getHost()
Get the hostname where the container runs.
|
List<String> |
getIPs()
Get all the IP addresses with which the container run.
|
abstract ContainerState |
getState()
Get the
ContainerState of the container. |
static ContainerStatus |
newInstance(ContainerId containerId,
ContainerState containerState,
String diagnostics,
int exitStatus) |
static ContainerStatus |
newInstance(ContainerId containerId,
ExecutionType executionType,
ContainerState containerState,
String diagnostics,
int exitStatus) |
void |
setCapability(Resource capability) |
abstract void |
setContainerId(ContainerId containerId) |
void |
setContainerSubState(ContainerSubState subState)
Add Extra state information of the container (SCHEDULED, LOCALIZING etc.).
|
abstract void |
setDiagnostics(String diagnostics) |
void |
setExecutionType(ExecutionType executionType) |
abstract void |
setExitStatus(int exitStatus) |
void |
setExposedPorts(String ports) |
void |
setHost(String host) |
void |
setIPs(List<String> ips) |
abstract void |
setState(ContainerState state) |
@InterfaceAudience.Private @InterfaceStability.Unstable public static ContainerStatus newInstance(ContainerId containerId, ContainerState containerState, String diagnostics, int exitStatus)
@InterfaceAudience.Private @InterfaceStability.Unstable public static ContainerStatus newInstance(ContainerId containerId, ExecutionType executionType, ContainerState containerState, String diagnostics, int exitStatus)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract ContainerId getContainerId()
ContainerId
of the container.ContainerId
of the container@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setContainerId(ContainerId containerId)
@InterfaceAudience.Public @InterfaceStability.Evolving public ExecutionType getExecutionType()
ExecutionType
of the container.ExecutionType
of the container@InterfaceAudience.Private @InterfaceStability.Unstable public void setExecutionType(ExecutionType executionType)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract ContainerState getState()
ContainerState
of the container.ContainerState
of the container@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setState(ContainerState state)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int getExitStatus()
Get the exit status for the container.
Note: This is valid only for completed containers i.e. containers
with state ContainerState.COMPLETE
.
Otherwise, it returns an ContainerExitStatus.INVALID.
Containers killed by the framework, either due to being released by the application or being 'lost' due to node failures etc. have a special exit code of ContainerExitStatus.ABORTED.
When threshold number of the nodemanager-local-directories or threshold number of the nodemanager-log-directories become bad, then container is not launched and is exited with ContainersExitStatus.DISKS_FAILED.
@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setExitStatus(int exitStatus)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getDiagnostics()
@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setDiagnostics(String diagnostics)
@InterfaceAudience.Public @InterfaceStability.Unstable public Resource getCapability()
Resource
allocated to the container.Resource
allocated to the container@InterfaceAudience.Private @InterfaceStability.Unstable public void setCapability(Resource capability)
@InterfaceAudience.Public @InterfaceStability.Unstable public List<String> getIPs()
@InterfaceAudience.Public @InterfaceStability.Unstable public String getHost()
@InterfaceAudience.Private @InterfaceStability.Unstable public void setHost(String host)
@InterfaceAudience.Private @InterfaceStability.Unstable public void setContainerSubState(ContainerSubState subState)
subState
- Extra State Information.@InterfaceAudience.Private @InterfaceStability.Unstable public ContainerSubState getContainerSubState()
@InterfaceAudience.Public @InterfaceStability.Unstable public String getExposedPorts()
@InterfaceAudience.Private @InterfaceStability.Unstable public void setExposedPorts(String ports)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.