[ 
https://issues.apache.org/jira/browse/YARN-4895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15218803#comment-15218803
 ] 

Konstantinos Karanasos commented on YARN-4895:
----------------------------------------------

Thanks, [~vvasudev].

bq. the function name "subtractFrom" implies that you're going to subtract the 
memory and cpu of the object from the values that are passed to the function 
and return a new object. 
I see your point. However, given that it is not a static method, {{addTo}} and 
{{subtractFrom}} seem OK to me. 
Think that you will have something like {{resourceUtil.addTo(...)}} or 
{{resourceUtil.subtractFrom(...)}}, which I think makes sense. What do you 
think?

bq. doesn't seem related to this patch - did you add it just as a good to have?
True, but as you point out, I think it's good to have, and it will also be 
needed for YARN-2883.

bq. It looks like there are no tests for the ResourceUtilization class at all. 
Can you please add some tests?
Yep, will do.

> Add subtractFrom method to ResourceUtilization class
> ----------------------------------------------------
>
>                 Key: YARN-4895
>                 URL: https://issues.apache.org/jira/browse/YARN-4895
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Konstantinos Karanasos
>            Assignee: Konstantinos Karanasos
>         Attachments: YARN-4895.001.patch
>
>
> In ResourceUtilization class, there is already an addTo method. 
> For completeness, here we are adding the dual subtractFrom method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to