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

Yufei Gu commented on YARN-7798:
--------------------------------

Thanks for filing this. [~youchen]. Looks good to me generally. Some nits:
 # In class SLSRuner#startAMFromSynthGenerator(), {{maxRedRes}} and  
{{maxRedDur}} seems no need to be there anymore, this applies to {{maxMapRes}} 
and {{maxMapDur}} as well.
#  Why do you use {Resource#compareTo} in  {{return 
o1.getResource().compareTo(o2.getResource());}} instead of 
{{Resources.componentwiseMax()}}?
 # This could be refactor to remove duplications.
{code:java}
Resource mapRes = Resource.newInstance(0,0);
long mapDur = 0;
if(!allMaps.isEmpty()){
  mapRes = Collections.max(allMaps, maxResource).getResource();
  mapDur = Collections.max(allMaps, maxDuration).getLifeTime();
}

Resource redRes = Resource.newInstance(0, 0);
long redDur = 0;
if(!allReduces.isEmpty()){
  redRes = Collections.max(allReduces, maxResource).getResource();
  redDur = Collections.max(allReduces, maxDuration).getLifeTime();
}
{code}
# Please fix the style issue found by QA bot.

> Refactor SLS Reservation Creation
> ---------------------------------
>
>                 Key: YARN-7798
>                 URL: https://issues.apache.org/jira/browse/YARN-7798
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Young Chen
>            Assignee: Young Chen
>            Priority: Minor
>         Attachments: YARN-7798.01.patch
>
>
> Move the reservation request creation out of SLSRunner and delegate to the 
> AMSimulator instance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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