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

Miklos Szegedi commented on YARN-7688:
--------------------------------------

Thank you for the patch [~belugabehr]. I have a few comments.
{code}
245           Queue<ProcessInfo> pInfoQueue = new ArrayDeque<ProcessInfo>();
246           pInfoQueue.addAll(me.getChildren());
{code}
What is the point of creating an ArrayDeque without an initial capacity, when 
the future content is known already?
{code}
433             isAvailable = true;
434             incJiffies += p.getDtime();
{code}
What the point of this reordering?
{code}
727               if (StringUtils.EMPTY.equals(ret)) {
{code}
Could you use just isEmpty()?




> Miscellaneous Improvements To ProcfsBasedProcessTree
> ----------------------------------------------------
>
>                 Key: YARN-7688
>                 URL: https://issues.apache.org/jira/browse/YARN-7688
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: nodemanager
>    Affects Versions: 3.0.0
>            Reporter: BELUGA BEHR
>            Priority: Minor
>         Attachments: YARN-7688.1.patch
>
>
> * Use ArrayDeque for performance instead of LinkedList
> * Use more Apache Commons routines to replace existing implementations
> * Remove superfluous code guards around DEBUG statements
> * Remove superfluous annotations in the tests
> * Other small improvements



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
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