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

Konstantinos Karanasos commented on YARN-7921:
----------------------------------------------

Hi [~cheersyang], I think this will be certainly useful.

We can indeed use the same syntax we described in the documentation. Also, you 
just need to support SingleConstraint and then the combined constraints. You 
don't need a special case for the Cardinality and Target constraints, as you 
can use the transformer to transform those to SingleConstraints.

Also, let's try to use the visitor pattern that we had created for the 
transformers too.

> 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
>
> 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: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to