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


@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ContainerStatus

ContainerStatus represents the current status of a Container.

It provides details such as:


Method Summary
 ContainerId getContainerId()
          Get the ContainerId of the container.
 String getDiagnostics()
          Get diagnostic messages for failed containers.
 int getExitStatus()
          Get the exit status for the container.
 org.apache.hadoop.yarn.api.records.ContainerState getState()
          Get the ContainerState of the container.
 

Method Detail

getContainerId

@InterfaceAudience.Public
@InterfaceStability.Stable
ContainerId getContainerId()
Get the ContainerId of the container.

Returns:
ContainerId of the container

getState

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

Returns:
ContainerState of the container

getExitStatus

@InterfaceAudience.Public
@InterfaceStability.Stable
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 invalid exit code equal to -1000;

Container 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 -100.

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 exit status of -101.

Returns:
exit status for the container

getDiagnostics

@InterfaceAudience.Public
@InterfaceStability.Stable
String getDiagnostics()
Get diagnostic messages for failed containers.

Returns:
diagnostic messages for failed containers


Copyright © 2012 Apache Software Foundation. All Rights Reserved.