hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6593) [API] Introduce Placement Constraint object
Date Thu, 20 Jul 2017 01:18:00 GMT

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

Chris Douglas commented on YARN-6593:
-------------------------------------

I like the {{T accept(Visitor<T> visitor)}} pattern and composing expressions with {{PlacementConstraints}};
these are well polished. I agree with [~leftnoteasy] on {{PlacementConstraints}} being the
primary {{\@Public}} API. Do we want to support users adding new transforms? If not, some
of the implementation details could be package-private.

[~leftnoteasy]: what are the semantics of updated constraints? Do they apply to all containers
placed subsequently, or could it cause a reconfiguration of allocated containers? Or are updates
restricted to (some?) parameters of the expression? This isn't covered in the design doc on
YARN-6592.

Minor:
* {{convert}} methods in {{PlacementConstraintFromProtoConverter}} should fail if composite
constraints have no children? Or would these invariants be checked by a validator after construction?
* {{PlacementConstraints#timedMillisConstraint}} could accept a [TimeUnit|https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html]
and convert to ms
* In this expression:
{noformat}
+      if (constraint.getOp() == TargetOperator.IN) {
+        newConstraint = new SingleConstraint(constraint.getScope(), 1,
+            Integer.MAX_VALUE, constraint.getTargetExpressions());
+      } else {
{noformat}
Might operator types be extended in the future, where this is not correct?
* All the constraints derive from the inner, {{AbstractConstraint}} type. This avoids having
{{PlacementConstraint}} accept a Visitor?
* A unit test demonstrating the PB serialization/deserialization would demonstrate the converter
classes.

> [API] Introduce Placement Constraint object
> -------------------------------------------
>
>                 Key: YARN-6593
>                 URL: https://issues.apache.org/jira/browse/YARN-6593
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Konstantinos Karanasos
>            Assignee: Konstantinos Karanasos
>             Fix For: 3.0.0-alpha3
>
>         Attachments: YARN-6593.001.patch, YARN-6593.002.patch, YARN-6593.003.patch, YARN-6593.004.patch
>
>
> This JIRA introduces an object for defining placement constraints.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message