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

Daniel Templeton commented on YARN-6679:
----------------------------------------

Thanks, [~daryn].  One comment: in the {{Resource.compareTo()}} method, you can 
replace the final ternary with {{Math.signum()}}.

How thoroughly has this been tested?  Wanna add some unit tests to confirm the 
{{newInstance()}} methods and the PB conversion work as expected?

> Reduce Resource instance overhead via non-PBImpl
> ------------------------------------------------
>
>                 Key: YARN-6679
>                 URL: https://issues.apache.org/jira/browse/YARN-6679
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.8.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>         Attachments: YARN-6679.branch-2.patch, YARN-6679.trunk.patch
>
>
> Creating and using transient PB-based Resource instances during scheduling is 
> very expensive.  The overhead can be transparently reduced by internally 
> using lightweight non-PB based instances.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to