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

Weiwei Yang commented on YARN-7921:
-----------------------------------

Hi [~kkaranasos]

Yes, the spec is same as the document, we are using the parser to parse those 
for DS from user input to a PC, and we are also able to parse a PC toString 
back to PC like what I did in the UT. It should be consistent.

I don't think we need to reserve ":" for node attributes namespace becuase from 
the latest discussion in YARN-3409, we plan to use DNS format for namespace, 
such as nm.yarn.io. Namespace and attribute name will be delimited by "/". 
Second, we are using ":" to separate multiple child constraint in a AND or OR 
constraint, so it's better to keep it this way. What do you think?

> Transform a PlacementConstraint to a string expression
> ------------------------------------------------------
>
>                 Key: YARN-7921
>                 URL: https://issues.apache.org/jira/browse/YARN-7921
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>            Priority: Major
>         Attachments: Placement Constraint Expression Syntax 
> Specification.pdf, YARN-7921.001.patch, YARN-7921.002.patch
>
>
> Purpose:
> Let placement constraint viewable on UI or log, e.g print app placement 
> constraint in RM app page. Help user to use constraints and analysis 
> placement issues easier.
> Propose:
> Like what was added for DS, toString is a reversed process of 
> {{PlacementConstraintParser}} that transforms a PlacementConstraint to a 
> string, using same syntax. E.g
> {code}
> AbstractConstraint constraintExpr = targetIn(NODE, allocationTag("hbase-m"));
> constraint.toString();
> // This prints: IN,NODE,hbase-m
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to