[
https://issues.apache.org/jira/browse/YARN-7822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16341068#comment-16341068
]
Weiwei Yang edited comment on YARN-7822 at 1/26/18 1:41 PM:
------------------------------------------------------------
Submitted v1 patch targeting to YARN-6592 branch. It seems pretty
straightforward to implement OR/AND composite constraints with existing API.
However I am confused with one thing. Like what marked with {{FIXME}} in
{{TestPlacementConstraintsUtil#testANDConstraintAssignment}}.
Basically I specified a constraint
{code:java}
// Place a "spark" allocation to a node doesn't have "hbase-m" tag and at most
3 allocations on each node
and(targetNotIn(NODE, allocationTag("hbase-m")), maxCardinality(NODE, 3,
"spark"))
{code}
however, during the test, I've allocated 3 "spark" containers over a node, so
it looks like
{noformat}
n0: hbase-m(1)
n1: spark(3)
n2: hbase-m(1)
n3: ""
{noformat}
I am expecting n1 cannot satisfy the constraint as it already has 3 spark
containers (reach the max cardinality). However, it passes... allocate 1 more
spark container onto n3 and then the check returns false...
I think I am confused by [this
comment|https://issues.apache.org/jira/browse/YARN-7774?focusedCommentId=16331286&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16331286]
...
{quote}For example, if we are placing a scheduling request with tag {{hb-m}}
and the constraint dictates that there should be no more than two {{hb-rs}} in
a node, then if there are two, placement should happen.
{quote}
[~asuresh], [~kkaranasos], can you please give me some hints?
Thanks
was (Author: cheersyang):
Submitted v1 patch targeting to YARN-6592 branch. It seems pretty
straightforward to implement OR/AND composite constraints with existing API.
However I am confused with one thing. Like what marked with {{FIXME}} in
{{TestPlacementConstraintsUtil#testANDConstraintAssignment}}.
Basically I specified a constraint
{code:java}
// Place a "spark" allocation to a node doesn't have "hbase-m" tag and at most
3 allocations on each node
and(targetNotIn(NODE, allocationTag("hbase-m")), maxCardinality(NODE, 3,
"spark"))
{code}
however, during the test, I've allocated 3 "spark" containers over a node, so
it looks like
{noformat}
n0: hbase-m(1)
n1: spark(3)
n2: hbase-m(1)
n3: ""
{noformat}
I am expecting n1 cannot satisfy the constraint as it already has 3 spark
containers (reach the max cardinality). However, it passes... allocate 1 more
spark container onto n3 and then the check returns false...
I think I am confused by this comment ...
{quote}For example, if we are placing a scheduling request with tag {{hb-m}}
and the constraint dictates that there should be no more than two {{hb-rs}} in
a node, then if there are two, placement should happen.
{quote}
[~asuresh], [~kkaranasos], can you please give me some hints?
Thanks
> Constraint satisfaction checker support for composite OR and AND constraints
> ----------------------------------------------------------------------------
>
> Key: YARN-7822
> URL: https://issues.apache.org/jira/browse/YARN-7822
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Arun Suresh
> Assignee: Weiwei Yang
> Priority: Major
> Attachments: YARN-7822-YARN-6592.001.patch
>
>
> JIRA to track changes to {{PlacementConstraintsUtil#canSatisfyConstraints}}
> handle OR and AND Composite constaints
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]