hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhangshilong (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4752) FairScheduler should preempt for a ResourceRequest and all preempted containers should be on the same node
Date Mon, 27 Feb 2017 03:32:45 GMT

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

zhangshilong commented on YARN-4752:

[~kasha]  I found one problem.
In FSLeafQueue:   I think resourceUsage of app should not be changed in assignContainer because
 FairShareComparator uses resourceUsage to sort Apps.
private TreeSet<FSAppAttempt> fetchAppsWithDemand() {
    TreeSet<FSAppAttempt> pendingForResourceApps =
        new TreeSet<>(policy.getComparator());
    try {
      for (FSAppAttempt app : runnableApps) {
        Resource pending = app.getAppAttemptResourceUsage().getPending();
        if (!pending.equals(none())) {
    } finally {
    return pendingForResourceApps;
But In FSPreemptionThread run->preemptContainers->app.trackContainerForPreemption  
preemptedResources of app will be changed without FairScheduler Lock.
So  getResourceUsage of App will be changed in function: assignContainer in FSLeafQueue.
  public Resource getResourceUsage() {
     * getResourcesToPreempt() returns zero, except when there are containers
     * to preempt. Avoid creating an object in the common case.
    return getPreemptedResources().equals(Resources.none())
        ? getCurrentConsumption()
        : Resources.subtract(getCurrentConsumption(), getPreemptedResources());

> FairScheduler should preempt for a ResourceRequest and all preempted containers should
be on the same node
> ----------------------------------------------------------------------------------------------------------
>                 Key: YARN-4752
>                 URL: https://issues.apache.org/jira/browse/YARN-4752
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: fairscheduler
>    Affects Versions: 2.8.0
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>             Fix For: 2.9.0, 3.0.0-alpha2
>         Attachments: yarn-4752-1.patch, yarn-4752.2.patch, yarn-4752.3.patch, yarn-4752.4.patch,
yarn-4752.4.patch, YARN-4752.FairSchedulerPreemptionOverhaul.pdf, yarn-6076-branch-2.1.patch
> A number of issues have been reported with respect to preemption in FairScheduler along
the lines of:
> # FairScheduler preempts resources from nodes even if the resultant free resources cannot
fit the incoming request.
> # Preemption doesn't preempt from sibling queues
> # Preemption doesn't preempt from sibling apps under the same queue that is over its
> # ...
> Filing this umbrella JIRA to group all the issues together and think of a comprehensive

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org

View raw message