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-5829) FS preemption should reserve a node before considering containers on it for preemption
Date Thu, 23 Mar 2017 23:27:41 GMT

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

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

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

    https://github.com/apache/hadoop/pull/201#discussion_r107807464
  
    --- Diff: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSSchedulerNode.java
---
    @@ -131,10 +203,58 @@ void addContainersForPreemption(Collection<RMContainer> containers)
{
     
       /**
        * Remove container from the set of containers marked for preemption.
    +   * Reserve the preempted resources for the app that requested
    +   * the preemption.
        *
        * @param container container to remove
        */
       void removeContainerForPreemption(RMContainer container) {
         containersForPreemption.remove(container);
       }
    +
    +  /**
    +   * The Scheduler has allocated containers on this node to the given
    +   * application.
    +   * @param rmContainer Allocated container
    +   * @param launchedOnNode True if the container has been launched
    +   */
    +  @Override
    +  protected synchronized void allocateContainer(RMContainer rmContainer,
    +                                                boolean launchedOnNode) {
    +    super.allocateContainer(rmContainer, launchedOnNode);
    +    Resource allocated = rmContainer.getAllocatedResource();
    +    if (!Resources.isNone(allocated)) {
    +      for (FSAppAttempt app: resourcesPreemptedPerApp.keySet()) {
    +        if (app.getApplicationAttemptId().equals(
    +            rmContainer.getApplicationAttemptId())) {
    +          Resource reserved = resourcesPreemptedPerApp.get(app);
    +          Resource fulfilled = Resources.componentwiseMin(reserved, allocated);
    --- End diff --
    
    Not really, because we would subtract a bigger value from total than from reserved, leaving
the state of the map and it's totals inconsistent.


> FS preemption should reserve a node before considering containers on it for preemption
> --------------------------------------------------------------------------------------
>
>                 Key: YARN-5829
>                 URL: https://issues.apache.org/jira/browse/YARN-5829
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: fairscheduler
>            Reporter: Karthik Kambatla
>            Assignee: Miklos Szegedi
>
> FS preemption evaluates nodes for preemption, and subsequently preempts identified containers.
If this node is not reserved for a specific application, any other application could be allocated
resources on this node. 
> Reserving the node for the starved application before preempting containers would help
avoid this.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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