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

Konstantinos Karanasos commented on YARN-7763:
----------------------------------------------

Thanks [~cheersyang].
{quote}I did not do that because I think we should have something better than 
{{instanceof}} to tell which constraint we are dealing with. E.g would a 
{{getType}} possible ?
{quote}
Without the instanceof, the cast will throw an exception though in case the 
user adds a composite constraint.

We could add a getType later if we see that we have other than these two 
constraint types to deal with.
{quote}We need to define the behavior how we merge constraints when there is 
several ones, we can have more discussion in a followup JIRA.
{quote}
Agreed. I just file YARN-7778, so that we can do it later. Could you please add 
a TODO when you deal with the different levels here, mentioning that Jira so 
that we don't forget to perform the merging?

+1 otherwise.

> Allow Constraints specified in the SchedulingRequest to override application 
> level constraints
> ----------------------------------------------------------------------------------------------
>
>                 Key: YARN-7763
>                 URL: https://issues.apache.org/jira/browse/YARN-7763
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Wangda Tan
>            Assignee: Weiwei Yang
>            Priority: Blocker
>         Attachments: YARN-7763-YARN-6592.001.patch, 
> YARN-7763-YARN-6592.002.patch, YARN-7763-YARN-6592.003.patch
>
>
> As I mentioned on YARN-6599, we will add SchedulingRequest as part of the 
> PlacementConstraintUtil method and both of processor/scheduler implementation 
> will use the same logic. The logic looks like:
> {code:java}
> PlacementConstraint pc = schedulingRequest.getPlacementConstraint();
> If (pc == null) {
>   pc = 
> PlacementConstraintMgr.getPlacementConstraint(schedulingRequest.getAllocationTags());
> }
> // Do placement constraint match ...{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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