[ https://issues.apache.org/jira/browse/TEZ-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14000303#comment-14000303 ]
Bikas Saha commented on TEZ-1039: --------------------------------- canFit is just a quick sanity check. Eventually the canAssignToContainer() method is called which does the signature matching etc. Will see if a common helper can be introduced. We will do the scan only for node level matching and not rack and *. So this reduces the number of items to be scanned. Also, the scan itself is designed to be light-weight, such that the heavy lifting of canAssignToContainer() is called to actually match the requests that specify the affinity and not all requests. Let me know if the code is not working that way. This scan should be no more expensive than the scan in a new method to get affinitized containers + additional book-keeping to detemine when to use either API. getMatchingRequestWithPriority() is called in the non-reuse case and in that case container affinity is invalid. Just following the existing code pattern in the test. > Add Container locality to TaskScheduler > --------------------------------------- > > Key: TEZ-1039 > URL: https://issues.apache.org/jira/browse/TEZ-1039 > Project: Apache Tez > Issue Type: Improvement > Reporter: Bikas Saha > Assignee: Bikas Saha > Attachments: TEZ-1039.1.patch > > > Currently, the task scheduler support node and rack locality. Proposal is to > add another level - container locality (given a container) which means first > try to assign to the container, then fall back to the container's node, rack > and so on. -- This message was sent by Atlassian JIRA (v6.2#6252)