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

Sean Po commented on YARN-5329:
-------------------------------

[~subru], [~curino] the test failure occurs because of the change in 
PlanningAlgorithm where _mapAllocations.put_ is swapped with 
_allocation.addInterval_. I have applied your patch, and reverted that part of 
the code, and the test cases that failed in TestRMWebServicesResevation passed.

{code:title=PlanningAlgorithm.java#allocationsToPaddedMap|borderStyle=solid}
    // If period > 0...
    // ...
    } else {
      // Pad at the beginning
      long earliestStart = findEarliestTime(allocation.toIntervalMap());
      if (jobArrival < earliestStart) {
        allocation.addInterval(new ReservationInterval(jobArrival, 
earliestStart), zeroResource);
      }

      // Pad at the beginning
      long latestEnd = findLatestTime(allocation.toIntervalMap());
      if (latestEnd < jobDeadline) {
        allocation.addInterval(new ReservationInterval(latestEnd, jobDeadline),
            zeroResource);
      }
    }
{code}


> ReservationAgent enhancements required to support recurring reservations in 
> the YARN ReservationSystem
> ------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-5329
>                 URL: https://issues.apache.org/jira/browse/YARN-5329
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Subru Krishnan
>            Assignee: Carlo Curino
>         Attachments: YARN-5329.v0.patch, YARN-5329.v1.patch, 
> YARN-5329.v2.patch, YARN-5329.v3.patch
>
>
> YARN-5326 proposes adding native support for recurring reservations in the 
> YARN ReservationSystem. This JIRA is a sub-task to track the changes required 
> in ReservationAgent to accomplish it. Please refer to the design doc in the 
> parent JIRA for details.



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