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

Sean Po commented on YARN-5331:
-------------------------------

Thanks for the quick update [~ajsangeetha]! A few more minor comments:

* NIT: PeriodicRLESparseResourceAllocation.java+32
** Please put a javadoc for the constructor, and make it clear that timePeriod 
is in ms.
* PeriodicRLESparseResourceAllocation.java+68 
** I noticed you changed the comparison operator from <= to <. I think <= is 
actually correct. The reason is because addInterval seems to set the tick at 
endTime = ZERO_RESOURCE before adding to existing RLE. *Currently*, if 
interval.getEndTime() == timePeriod - 1 (which is the latest acceptable 
endTime), then RLE at tick timePeriod -1 will be set to ZERO_RESOURCE. I 
believe this is a bug.
** Please add a unit test to verify this logic. A simple case would be to 
setCapacityInInterval with interval from 0 to the latest acceptable endTime, 
and make sure that getCapacityAtTime(timePeriod - 1) is non zero. I believe 
this test case will fail with current code.
* NIT: PeriodicRLESparseResourceAllocation.java+83
** Similar checks from PeriodicRLESparseResourceAllocation.java+68 should be 
made here.
* TestPeriodicRLESparseResourceAllocation.java
** Since we have checks in 
PeriodicRLESparseResourceAllocation::setCapacityInInterval and 
PeriodicRLESparseResourceAllocation::removeInterval for valid time intervals, 
lets add positive and negative unit tests for these.




> Extend RLESparseResourceAllocation with period for supporting recurring 
> reservations in YARN ReservationSystem
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-5331
>                 URL: https://issues.apache.org/jira/browse/YARN-5331
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Subru Krishnan
>            Assignee: Sangeetha Abdu Jyothi
>         Attachments: YARN-5331.001.patch, YARN-5331.002.patch, 
> YARN-5331.003.patch
>
>
> YARN-5326 proposes adding native support for recurring reservations in the 
> YARN ReservationSystem. This JIRA is a sub-task to add a 
> PeriodicRLESparseResourceAllocation. Please refer to the design doc in the 
> parent JIRA for details.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to