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

Jim Brennan commented on YARN-9903:
-----------------------------------

[~epayne], I have added unit tests in patch 003.   I originally tried adding a 
test to TestReservations based on testAssignToQueue(), but I was having trouble 
enabling the node label support in that test.  I instead added two tests based 
on testAssignToQueue() in TestNodeLabelContainerAllocation.   The only 
difference between them is one uses default labels for the queues and the other 
specifies the labels in the resource requests.

While testing this, I found that I had to make this additional change in 
RegularContainerAllocator.checkHeadroom():
{noformat}
Resource resourceCouldBeUnReserved = application.getCurrentReservation();
{noformat}
Changed to:
{noformat}
Resource resourceCouldBeUnReserved =
    application.getAppAttemptResourceUsage().getReserved(nodePartition);
{noformat}
Please let me know if you are OK with this change.  Without it, my tests were 
failing because this code was only looking for reservations for NO_LABEL.


 This made me wonder about the change [~pbacsko] made in his patch for 
YARN-10283 where he passes the nodePartition to 
application.findNodeToUnreserve(). I have not included that change in this 
patch. Let me know if you think I should.

> Support reservations continue looking for Node Labels
> -----------------------------------------------------
>
>                 Key: YARN-9903
>                 URL: https://issues.apache.org/jira/browse/YARN-9903
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Tarun Parimi
>            Assignee: Jim Brennan
>            Priority: Major
>         Attachments: YARN-9903.001.patch, YARN-9903.002.patch, 
> YARN-9903.003.patch
>
>
> YARN-1769 brought in reservations continue looking feature which improves the 
> several resource reservation scenarios. However, it is not handled currently 
> when nodes have a label assigned to them. This is useful and in many cases 
> necessary even for Node Labels. So we should look to support this for node 
> labels also.
> For example, in AbstractCSQueue.java, we have the below TODO.
> {code:java}
> // TODO, now only consider reservation cases when the node has no label 
> if (this.reservationsContinueLooking && nodePartition.equals( 
> RMNodeLabelsManager.NO_LABEL) && Resources.greaterThan( resourceCalculator, 
> clusterResource, resourceCouldBeUnreserved, Resources.none())) {
> {code}
> cc [~sunilg]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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