hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5605) Preempt containers (all on one node) to meet the requirement of starved applications
Date Wed, 07 Sep 2016 17:03:20 GMT

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

ASF GitHub Bot commented on YARN-5605:
--------------------------------------

Github user templedf commented on a diff in the pull request:

    https://github.com/apache/hadoop/pull/124#discussion_r77863924
  
    --- Diff: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java
---
    @@ -478,6 +492,31 @@ public void clearPreemptedResources() {
         preemptedResources.setVirtualCores(0);
       }
     
    +  public boolean canContainerBePreempted(RMContainer container) {
    +    // Sanity check that the app owns this container
    +    if (!liveContainers.containsKey(container.getContainerId()) &&
    +        !newlyAllocatedContainers.contains(container)) {
    +      LOG.error("Looking to preempt container " + container +
    +          ". Container does not belong to app " + getApplicationId());
    +      return false;
    +    }
    +
    +    // Check if any of the parent queues are not preemptable
    +    // TODO (KK): Propagate the "preemptable" flag all the way down to the app
    +    // to avoid recursing up every time.
    +    FSQueue queue = getQueue();
    +    while (!queue.getQueueName().equals("root")) {
    +      if (!queue.isPreemptable()) {
    +        return false;
    +      }
    +    }
    +
    +    // Check if the app's allocation will be over its fairshare even
    +    // after preempting this container
    +    return (Resources.fitsIn(container.getAllocatedResource(),
    +        Resources.subtract(getResourceUsage(), getFairShare())));
    +  }
    --- End diff --
    
    Indentation


> Preempt containers (all on one node) to meet the requirement of starved applications
> ------------------------------------------------------------------------------------
>
>                 Key: YARN-5605
>                 URL: https://issues.apache.org/jira/browse/YARN-5605
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: fairscheduler
>            Reporter: Karthik Kambatla
>            Assignee: Karthik Kambatla
>         Attachments: yarn-5605-1.patch
>
>
> Required items:
> # Identify starved applications
> # Identify a node that has enough containers from applications over their fairshare.
> # Preempt those containers



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

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


Mime
View raw message