MENG DING commented on YARN-1509:

Had an offline discussion with [~leftnoteasy] and [~bikassaha]. Overall we 
agreed that we can combine the separate increase/decrease requests into one API 
in the client:

* Combine {{requestContainerResourceIncrease}} and 
{{requestContainerResourceDecrease}} into one API. For example:
   * Request container resource change before calling <code>allocate</code>.
   * Any previous pending resource change request of the same container will be
   * cancelled.
   * @param container The container returned from the last successful resource
   *                  allocation or resource change
   * @param capability  The target resource capability of the container
  public abstract void requestContainerResourceChange(
      Container container, Resource capability);
User must pass in a container object (instead of just a container ID), and the 
target resource capability. Because the container object contains the existing 
container Resource, the AMRMClient can use that information to compare against 
the target resource to figure out if this is an increase or decrease request.

* There is *NO* need to change the AMRM protocol. 

* For the CallbackHandler methods, we can also combine 
{{onContainersResourceDecreased}} and {{onContainersResourceIncreased}} into 
one API:
    public abstract void onContainersResourceChanged(
        List<Container> containers);
The user can compare the passed-in containers with the containers they have 
remembered to determine if this is an increase or decrease request. Or maybe we 
can make it even simpler by doing something like the following? Thoughts?
    public abstract void onContainersResourceChanged(
        List<Container> increasedContainers,  List<Container> 

* We can *deprecate* the existing CallbackHandler interface and use the 
AbstractCallbackHandler instead.

[~bikassaha], [~leftnoteasy], any comments?

> Make AMRMClient support send increase container request and get 
> increased/decreased containers
> ----------------------------------------------------------------------------------------------
>                 Key: YARN-1509
>                 URL: https://issues.apache.org/jira/browse/YARN-1509
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Wangda Tan (No longer used)
>            Assignee: MENG DING
>         Attachments: YARN-1509.1.patch, YARN-1509.2.patch, YARN-1509.3.patch, 
> YARN-1509.4.patch, YARN-1509.5.patch
> As described in YARN-1197, we need add API in AMRMClient to support
> 1) Add increase request
> 2) Can get successfully increased/decreased containers from RM

This message was sent by Atlassian JIRA

Reply via email to