MENG DING commented on YARN-3866:

Thanks [~jianhe] for the review!

bq. Mark all getters/setters unstable for now
Will do
bq. DecreasedContainer.java/IncreasedContainer.java - how about reusing the 
Container.java object?
This seems to be a better approach, and does simplify the code quite a bit. I 
can't think of anything wrong about it. If nobody else oppose this, I will go 
ahead changing it.
bq. increaseRequests/decreaseRequests - We may just pass one list of 
changeResourceRequests instead of differentiating whether it’s increase or 
decrease ? as the underlying implementations are the same. IMO, this also saves 
application writers from differentiating them programmatically.
Actually we thought about using a single changeResourceRequests, the main 
reasons that we separate them are:
* We do want application writers to make a conscious decision about whether 
they are making an increase request or decrease request, and tell Resource 
Manager explicitly, such that if they make a mistake, RM will be able to catch 
that. For example, if a user intends to increase a container resource, but made 
a mistake by passing in a resource value smaller than the current resource 
allocation, RM will catch this and will NOT actually decrease the resource. If 
a user had sent a changeResourceRequest to RM, RM would not know the original 
intention, and go ahead decrease the resource. As a result, the container may 
be killed if memory enforcement is enabled.
* Reduce the logic in RM to check if a request is for increase or decrease 
(less of a concern).

Let me know if the above concerns make sense to you or not.

> AM-RM protocol changes to support container resizing
> ----------------------------------------------------
>                 Key: YARN-3866
>                 URL: https://issues.apache.org/jira/browse/YARN-3866
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: api
>            Reporter: MENG DING
>            Assignee: MENG DING
>         Attachments: YARN-3866.1.patch, YARN-3866.2.patch
> YARN-1447 and YARN-1448 are outdated. 
> This ticket deals with AM-RM Protocol changes to support container resize 
> according to the latest design in YARN-1197.
> 1) Add increase/decrease requests in AllocateRequest
> 2) Get approved increase/decrease requests from RM in AllocateResponse
> 3) Add relevant test cases

This message was sent by Atlassian JIRA

Reply via email to