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

Eric Payne commented on YARN-4945:
----------------------------------

Thanks [~sunilg].
{quote}
bq. if it's already in selectedCandidates, it's because an inter-queue 
preemption policy put it there
I think I must give some more clarity for what I am trying to do here. Its 
possible that there can be some containers which were selected by 
priority/user-limit policy may already be selected from inter-queue policies. 
In that case, we need not have to mark them again. Rather we can deduct the 
resource directly as its container marked for preemption.
{quote}
OK. I think I see what you are saying.

In {{IntraQueueCandidatesSelector#preemptFromLeastStarvedApp}}:
{code}
      if (CapacitySchedulerPreemptionUtils.isContainerAlreadySelected(c,
          selectedCandidates)) {
        Resources.subtractFrom(toObtainByPartition, c.getAllocatedResource());
        continue;
      }
{code}
IIUC, you are saying that at this point, {{toObtainByPartition}} contains 
requested resources from _both_ inter-queue _and_ intra-queue preemption 
policies. So, since this container has already been selected by the inter-queue 
policies, skip it, stop tracking its resources in {{toObtainByPartition}} (by 
subtracting out the container's size), and keep looking for another container 
to mark as preemptable. Is that correct?

-----
Also, I think that priority and user-limit-percent preemption policies should 
be separate policies. Do you agree? If so, can we please rename 
{{IntraQueueCandidatesSelector}} to something like 
{{IntraQueuePriorityCandidatesSelector}}


> [Umbrella] Capacity Scheduler Preemption Within a queue
> -------------------------------------------------------
>
>                 Key: YARN-4945
>                 URL: https://issues.apache.org/jira/browse/YARN-4945
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Wangda Tan
>         Attachments: Intra-Queue Preemption Use Cases.pdf, 
> IntraQueuepreemption-CapacityScheduler (Design).pdf, YARN-2009-wip.2.patch, 
> YARN-2009-wip.patch, YARN-2009-wip.v3.patch
>
>
> This is umbrella ticket to track efforts of preemption within a queue to 
> support features like:
> YARN-2009. YARN-2113. YARN-4781.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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