allocate

Request additional containers and receive new container allocations.
Requests made via addContainerRequest are sent to the
ResourceManager. New containers assigned to the master are
retrieved. Status of completed containers and node health updates are
also retrieved.
This also doubles up as a heartbeat to the ResourceManager and must be
made periodically.
The call may not always return any new allocations of containers.
App should not make concurrent allocate requests. May cause request loss.

removeContainerRequest

Remove previous container request. The previous container request may have
already been sent to the ResourceManager. So even after the remove request
the app must be prepared to receive an allocation for the previous request
even after the remove request

Parameters:

req - Resource request

releaseAssignedContainer

Release containers assigned by the Resource Manager. If the app cannot use
the container or wants to give up the container then it can release them.
The app needs to make new requests for the released resource capability if
it still needs it. eg. it released non-local resources

getMatchingRequests

Get outstanding ContainerRequests matching the given
parameters. These ContainerRequests should have been added via
addContainerRequest earlier in the lifecycle. For performance,
the AMRMClient may return its internal collection directly without creating
a copy. Users should not perform mutable operations on the return value.
Each collection in the list contains requests with identical
Resource size that fit in the given capability. In a
collection, requests will be returned in the same order as they were added.