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

Arun Suresh commented on YARN-7682:
-----------------------------------

To be honest - I prefer passing it as a parameter.
That way the API is clear - "to verify constraint violation, we need the 
following things: the TagsManager, the soruce tags and the Node on which we 
intend to check"
I am not a big fan of init() based injection - since now we have an implicit 
initialization ordering. When the RM starts up, we need to start the 
AllocationTagsManager first and THEN pass that to the PCM's init - this can 
lead to bugs later and is more difficult to test.

To be really honest, this should actually be a utility function, but having it 
in the PCM is still fine, because the PCM end of the day stores the constraint 
and might be more appropriate to transform constraints her. So am fine with it 
being in the PCM.

> Expose canAssign method in the PlacementConstraintManager
> ---------------------------------------------------------
>
>                 Key: YARN-7682
>                 URL: https://issues.apache.org/jira/browse/YARN-7682
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Arun Suresh
>            Assignee: Panagiotis Garefalakis
>         Attachments: YARN-7682.wip.patch
>
>
> As per discussion in YARN-7613. Lets expose {{canAssign}} method in the 
> PlacementConstraintManager that takes a sourceTags, applicationId, 
> SchedulerNode and AllocationTagsManager and returns true if constraints are 
> not violated by placing the container on the node.
> I prefer not passing in the SchedulingRequest, since it can have > 1 
> numAllocations. We want this api to be called for single allocations.



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