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

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

bq. If containerResourceAllocated fails in guaranteedContainerResourceAllocated 
we will still call allocatedContainers.put(). I think this may cause some 
inconsistencies in the future. Probably it is better to propagate the false 
return code all the way to the caller.
bq. guaranteedContainerResourceReleased may fail inside but regardless of the 
outcome, we decrease numGuaranteedContainers.
These two are the current behavior without the patch. The resource release can 
fail only if resource is null, in which case is equivalent to releasing a 
zero-sized container, but it won't cause any inconsistency. 

bq.  I think that it would be nicer to lock around these two calls to become 
atomic.
That's a valid concern. container update and thus swap is atomic according to 
[~asuresh]. But that is indeed not very clear. Let's discuss this in another 
jira to see if we can improve it.
 
Will address the rest of your comments in the next patch plus unit tests.


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




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