[
https://issues.apache.org/jira/browse/YARN-7798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338495#comment-16338495
]
Yufei Gu edited comment on YARN-7798 at 1/25/18 12:42 AM:
----------------------------------------------------------
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 and bugs found by QA bot.
was (Author: yufeigu):
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: [email protected]
For additional commands, e-mail: [email protected]