[ https://issues.apache.org/jira/browse/YARN-2496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14171460#comment-14171460 ]
Vinod Kumar Vavilapalli commented on YARN-2496: ----------------------------------------------- More comments ParentQueue - assignToQueue(): We are only checking that at least one label is within maximum capacity. Bug? - assignToQueue() -> canAssignToThisQueue - Not related to your patch, but removeApplication() can be private. Similarly assignContainersToChildQueues, printChildQueues. - Can avoid multiple calls to labelManager.getLabelsOnNode(node.getNodeID()) inside assignContainers. - getACLs() should be pushed up to AbstractQueue. - I think reservations are still not handled per accessible node-labels in the patch. We can fix it separately though. - Sorting queues doesn't take node-labels into account. Again, we can fix it separately. - Explicitly mark calls to allocateResource() and releaseResource with super for better readability. - We should change printChildQueues() and getChildQueuesToPrint() to print node-label associations too. - The following check in LeafQueue needs to be present in ParentQueue too? {code} // if our queue cannot access this node, just return if (!SchedulerUtils.checkQueueAccessToNode(accessibleLabels, labelManager.getLabelsOnNode(node.getNodeID()))) { return NULL_ASSIGNMENT; } {code} AbstractQueue - queueComparator should be pushed down to ParentQueue. - releaseResource() should be protected More to come. > Changes for capacity scheduler to support allocate resource respect labels > -------------------------------------------------------------------------- > > Key: YARN-2496 > URL: https://issues.apache.org/jira/browse/YARN-2496 > Project: Hadoop YARN > Issue Type: Sub-task > Components: resourcemanager > Reporter: Wangda Tan > Assignee: Wangda Tan > Attachments: YARN-2496-20141009-1.patch, YARN-2496.patch, > YARN-2496.patch, YARN-2496.patch, YARN-2496.patch, YARN-2496.patch, > YARN-2496.patch, YARN-2496.patch, YARN-2496.patch > > > This JIRA Includes: > - Add/parse labels option to {{capacity-scheduler.xml}} similar to other > options of queue like capacity/maximum-capacity, etc. > - Include a "default-label-expression" option in queue config, if an app > doesn't specify label-expression, "default-label-expression" of queue will be > used. > - Check if labels can be accessed by the queue when submit an app with > labels-expression to queue or update ResourceRequest with label-expression > - Check labels on NM when trying to allocate ResourceRequest on the NM with > label-expression > - Respect labels when calculate headroom/user-limit -- This message was sent by Atlassian JIRA (v6.3.4#6332)