@InterfaceAudience.Public @InterfaceStability.Stable public interface ContainerManager
The protocol between an ApplicationMaster and a
NodeManager to start/stop containers and to get status
of running containers.
If security is enabled the NodeManager verifies that the
ApplicationMaster has truly been allocated the container
by the ResourceManager and also verifies all interactions such
as stopping the container or obtaining status information for the container.
| Modifier and Type | Method and Description |
|---|---|
GetContainerStatusResponse |
getContainerStatus(GetContainerStatusRequest request)
The api used by the
ApplicationMaster to request for
current status of a Container from the
NodeManager. |
StartContainerResponse |
startContainer(StartContainerRequest request)
The
ApplicationMaster requests a NodeManager
to start a Container allocated to it using this interface. |
StopContainerResponse |
stopContainer(StopContainerRequest request)
The
ApplicationMaster requests a NodeManager
to stop a Container allocated to it using this interface. |
@InterfaceAudience.Public @InterfaceStability.Stable StartContainerResponse startContainer(StartContainerRequest request) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
The ApplicationMaster requests a NodeManager
to start a Container allocated to it using this interface.
The ApplicationMaster has to provide details such as
allocated resource capability, security tokens (if enabled), command
to be executed to start the container, environment for the process,
necessary binaries/jar/shared-objects etc. via the
ContainerLaunchContext in the StartContainerRequest.
Currently the NodeManager sends an immediate, empty
response via StartContainerResponse to signify acceptance of the
request and throws an exception in case of errors. The
ApplicationMaster can use
getContainerStatus(GetContainerStatusRequest) to get updated
status of the to-be-launched or launched container.
request - request to start a containerorg.apache.hadoop.yarn.exceptions.YarnRemoteException@InterfaceAudience.Public @InterfaceStability.Stable StopContainerResponse stopContainer(StopContainerRequest request) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
The ApplicationMaster requests a NodeManager
to stop a Container allocated to it using this interface.
The ApplicationMaster sends a
StopContainerRequest which includes the ContainerId of the
container to be stopped.
Currently the NodeManager sends an immediate, empty
response via StopContainerResponse to signify acceptance of the
request and throws an exception in case of errors. The
ApplicationMaster can use
getContainerStatus(GetContainerStatusRequest) to get updated
status of the container.
request - request to stop a containerorg.apache.hadoop.yarn.exceptions.YarnRemoteException@InterfaceAudience.Public @InterfaceStability.Stable GetContainerStatusResponse getContainerStatus(GetContainerStatusRequest request) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
The api used by the ApplicationMaster to request for
current status of a Container from the
NodeManager.
The ApplicationMaster sends a
GetContainerStatusRequest which includes the ContainerId of
the container whose status is needed.
The NodeManager responds with
GetContainerStatusResponse which includes the
ContainerStatus of the container.
request - request to get ContainerStatus of a container
with the specified ContainerIdContainerStatus of the
containerorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionCopyright © 2014 Apache Software Foundation. All Rights Reserved.