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

Haibo Chen commented on YARN-4511:
----------------------------------

Thanks [~asuresh] for your review!
bq. Is there a case where the 'resource' argument might be null in the former 
method call (since that is only case when the containerResourceAllocated method 
can return false)?
Not sure. But this is the same behavior as before, so I figure it's safer to 
preserve it.  The reason why I did not do the same in 
opportunisticContainerResourceAllocated is that 
there is nothing else to do if containerResourceAlllocated returns to true. 
i.e., if we were to make it consistent, it'll be like 
{code}
if (containerAllocated(resource, allocatedResourceOpportunistic)) {
     // nothing else to do
}
{code}
Not sure what's best style here. Open to all suggestions/preferences.

bq. but then in the SchedulerNodeReport, shouldn't this.num = numOpp + 
numGuaranteed ?
Yes. but given how used/avail is assigned in SchedulerNodeReport (used -> 
guaranteedResourceUsed, num-> numGuaranteedContainers),
I created YARN-7337 to augment SchedulerNodeReport with opportunistic container 
stats instead of modifying existing variables and also
make sure it is exposed properly in NodeReport api

> Common scheduler changes supporting scheduler-specific implementations
> ----------------------------------------------------------------------
>
>                 Key: YARN-4511
>                 URL: https://issues.apache.org/jira/browse/YARN-4511
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Wangda Tan
>            Assignee: Haibo Chen
>         Attachments: YARN-4511-YARN-1011.00.patch, 
> YARN-4511-YARN-1011.01.patch, YARN-4511-YARN-1011.02.patch, 
> YARN-4511-YARN-1011.03.patch, YARN-4511-YARN-1011.04.patch, 
> YARN-4511-YARN-1011.05.patch, YARN-4511-YARN-1011.06.patch, 
> YARN-4511-YARN-1011.07.patch, YARN-4511-YARN-1011.08.patch, 
> YARN-4511-YARN-1011.09.patch
>
>




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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to