@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ContainerManagementProtocol
The protocol between an ApplicationMaster
and a
NodeManager
to start/stop and increase resource of 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 |
---|---|
CommitResponse |
commitLastReInitialization(ContainerId containerId)
Commit the Last ReInitialization if possible.
|
GetContainerStatusesResponse |
getContainerStatuses(GetContainerStatusesRequest request)
The API used by the
ApplicationMaster to request for current
statuses of Container s from the NodeManager . |
IncreaseContainersResourceResponse |
increaseContainersResource(IncreaseContainersResourceRequest request)
Deprecated.
|
ResourceLocalizationResponse |
localize(ResourceLocalizationRequest request)
Localize resources required by the container.
|
ReInitializeContainerResponse |
reInitializeContainer(ReInitializeContainerRequest request)
ReInitialize the Container with a new Launch Context.
|
RestartContainerResponse |
restartContainer(ContainerId containerId)
Restart the container.
|
RollbackResponse |
rollbackLastReInitialization(ContainerId containerId)
Rollback the Last ReInitialization if possible.
|
SignalContainerResponse |
signalToContainer(SignalContainerRequest request) |
StartContainersResponse |
startContainers(StartContainersRequest request)
The
ApplicationMaster provides a list of
StartContainerRequest s to a NodeManager to
start Container s allocated to it using this interface. |
StopContainersResponse |
stopContainers(StopContainersRequest request)
The
ApplicationMaster requests a NodeManager to
stop a list of Container s allocated to it using this
interface. |
ContainerUpdateResponse |
updateContainer(ContainerUpdateRequest request)
The API used by the
ApplicationMaster to request for
resource update of running containers on the NodeManager . |
@InterfaceAudience.Public @InterfaceStability.Stable StartContainersResponse startContainers(StartContainersRequest request) throws YarnException, IOException
The ApplicationMaster
provides a list of
StartContainerRequest
s to a NodeManager
to
start Container
s 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
.
The NodeManager
sends a response via
StartContainersResponse
which includes a list of
Container
s of successfully launched Container
s, a
containerId-to-exception map for each failed StartContainerRequest
in
which the exception indicates errors from per container and a
allServicesMetaData map between the names of auxiliary services and their
corresponding meta-data. Note: None-container-specific exceptions will
still be thrown by the API method itself.
The ApplicationMaster
can use
getContainerStatuses(GetContainerStatusesRequest)
to get updated
statuses of the to-be-launched or launched containers.
request
- request to start a list of containersYarnException
IOException
@InterfaceAudience.Public @InterfaceStability.Stable StopContainersResponse stopContainers(StopContainersRequest request) throws YarnException, IOException
The ApplicationMaster
requests a NodeManager
to
stop a list of Container
s allocated to it using this
interface.
The ApplicationMaster
sends a StopContainersRequest
which includes the ContainerId
s of the containers to be stopped.
The NodeManager
sends a response via
StopContainersResponse
which includes a list of ContainerId
s of successfully stopped containers, a containerId-to-exception map for
each failed request in which the exception indicates errors from per
container. Note: None-container-specific exceptions will still be thrown by
the API method itself. ApplicationMaster
can use
getContainerStatuses(GetContainerStatusesRequest)
to get updated
statuses of the containers.
request
- request to stop a list of containersYarnException
IOException
@InterfaceAudience.Public @InterfaceStability.Stable GetContainerStatusesResponse getContainerStatuses(GetContainerStatusesRequest request) throws YarnException, IOException
The API used by the ApplicationMaster
to request for current
statuses of Container
s from the NodeManager
.
The ApplicationMaster
sends a
GetContainerStatusesRequest
which includes the ContainerId
s
of all containers whose statuses are needed.
The NodeManager
responds with
GetContainerStatusesResponse
which includes a list of
ContainerStatus
of the successfully queried containers and a
containerId-to-exception map for each failed request in which the exception
indicates errors from per container. Note: None-container-specific
exceptions will still be thrown by the API method itself.
request
- request to get ContainerStatus
es of containers with
the specified ContainerId
sContainerStatus
of the
successfully queried containers and a containerId-to-exception map
for failed requests.YarnException
IOException
@InterfaceAudience.Public @InterfaceStability.Unstable @Deprecated IncreaseContainersResourceResponse increaseContainersResource(IncreaseContainersResourceRequest request) throws YarnException, IOException
The API used by the ApplicationMaster
to request for
resource increase of running containers on the NodeManager
.
request
- request to increase resource of a list of containersYarnException
IOException
@InterfaceAudience.Public @InterfaceStability.Unstable ContainerUpdateResponse updateContainer(ContainerUpdateRequest request) throws YarnException, IOException
The API used by the ApplicationMaster
to request for
resource update of running containers on the NodeManager
.
request
- request to update resource of a list of containersYarnException
- Exception specific to YARNIOException
- IOException thrown from NodeManagerSignalContainerResponse signalToContainer(SignalContainerRequest request) throws YarnException, IOException
YarnException
IOException
@InterfaceAudience.Public @InterfaceStability.Unstable ResourceLocalizationResponse localize(ResourceLocalizationRequest request) throws YarnException, IOException
request
- Specify the resources to be localized.YarnException
- Exception specific to YARNIOException
- IOException thrown from the RPC layer.@InterfaceAudience.Public @InterfaceStability.Unstable ReInitializeContainerResponse reInitializeContainer(ReInitializeContainerRequest request) throws YarnException, IOException
request
- Specify the new ContainerLaunchContext.YarnException
- Exception specific to YARN.IOException
- IOException thrown from the RPC layer.@InterfaceAudience.Public @InterfaceStability.Unstable RestartContainerResponse restartContainer(ContainerId containerId) throws YarnException, IOException
containerId
- Container Id.YarnException
- Exception specific to YARN.IOException
- IOException thrown from the RPC layer.@InterfaceAudience.Public @InterfaceStability.Unstable RollbackResponse rollbackLastReInitialization(ContainerId containerId) throws YarnException, IOException
containerId
- Container Id.YarnException
- Exception specific to YARN.IOException
- IOException thrown from the RPC layer.@InterfaceAudience.Public @InterfaceStability.Unstable CommitResponse commitLastReInitialization(ContainerId containerId) throws YarnException, IOException
containerId
- Container Id.YarnException
- Exception specific to YARN.IOException
- IOException thrown from the RPC layer.Copyright © 2022 Apache Software Foundation. All rights reserved.