Package | Description |
---|---|
org.apache.hadoop.yarn.api.resource |
API related to resources.
|
org.apache.hadoop.yarn.util.constraint |
Package org.apache.hadoop.yarn.util.constraint contains classes
which is used as utility class for placement constraints.
|
Modifier and Type | Class and Description |
---|---|
static class |
PlacementConstraint.And
Class that represents a composite constraint that is a conjunction of other
constraints.
|
static class |
PlacementConstraint.CardinalityConstraint
Class that represents a cardinality constraint.
|
static class |
PlacementConstraint.CompositeConstraint<R extends PlacementConstraint.Visitable>
Class that represents composite constraints, which comprise other
constraints, forming a constraint tree.
|
static class |
PlacementConstraint.DelayedOr
Class that represents a composite constraint that comprises a list of timed
placement constraints (see
PlacementConstraint.TimedPlacementConstraint ). |
static class |
PlacementConstraint.Or
Class that represents a composite constraint that is a disjunction of other
constraints.
|
static class |
PlacementConstraint.SingleConstraint
Consider a set of nodes N that belongs to the scope specified in the
constraint.
|
static class |
PlacementConstraint.TargetConstraint
Class that represents a target constraint.
|
Modifier and Type | Method and Description |
---|---|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.cardinality(String scope,
int minCardinality,
int maxCardinality,
String... allocationTags)
Creates a constraint that restricts the number of allocations within a
given scope (e.g., node or rack).
|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.cardinality(String scope,
String namespace,
int minCardinality,
int maxCardinality,
String... allocationTags)
Similar to
PlacementConstraints.cardinality(String, int, int, String...) , but let you
attach a namespace to the given allocation tags. |
PlacementConstraint.AbstractConstraint |
PlacementConstraint.TimedPlacementConstraint.getConstraint()
Get the constraint that has to be satisfied within the time window.
|
PlacementConstraint.AbstractConstraint |
PlacementConstraint.getConstraintExpr()
Get the constraint expression of the placement constraint.
|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.maxCardinality(String scope,
int maxCardinality,
String... allocationTags)
Similar to
PlacementConstraints.cardinality(String, int, int, String...) , but
determines only the maximum cardinality (the minimum cardinality is 0). |
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.maxCardinality(String scope,
String tagNamespace,
int maxCardinality,
String... allocationTags)
Similar to
PlacementConstraints.maxCardinality(String, int, String...) , but let you
specify a namespace for the tags, see supported namespaces in
AllocationTagNamespaceType . |
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.minCardinality(String scope,
int minCardinality,
String... allocationTags)
Similar to
PlacementConstraints.cardinality(String, int, int, String...) , but
determines only the minimum cardinality (the maximum cardinality is
unbound). |
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.minCardinality(String scope,
String namespace,
int minCardinality,
String... allocationTags)
Similar to
PlacementConstraints.minCardinality(String, int, String...) , but let you
attach a namespace to the allocation tags. |
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.targetCardinality(String scope,
int minCardinality,
int maxCardinality,
PlacementConstraint.TargetExpression... targetExpressions)
This constraint generalizes the cardinality and target constraints.
|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.targetIn(String scope,
PlacementConstraint.TargetExpression... targetExpressions)
Creates a constraint that requires allocations to be placed on nodes that
satisfy all target expressions within the given scope (e.g., node or rack).
|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.targetNodeAttribute(String scope,
NodeAttributeOpCode opCode,
PlacementConstraint.TargetExpression... targetExpressions)
Creates a constraint that requires allocations to be placed on nodes that
belong to a scope (e.g., node or rack) that satisfy any of the
target expressions based on node attribute op code.
|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.targetNotIn(String scope,
PlacementConstraint.TargetExpression... targetExpressions)
Creates a constraint that requires allocations to be placed on nodes that
belong to a scope (e.g., node or rack) that does not satisfy any of the
target expressions.
|
Modifier and Type | Method and Description |
---|---|
List<PlacementConstraint.AbstractConstraint> |
PlacementConstraint.And.getChildren() |
List<PlacementConstraint.AbstractConstraint> |
PlacementConstraint.Or.getChildren() |
Modifier and Type | Method and Description |
---|---|
static PlacementConstraint.And |
PlacementConstraints.and(PlacementConstraint.AbstractConstraint... children)
A conjunction of constraints.
|
static PlacementConstraint |
PlacementConstraints.build(PlacementConstraint.AbstractConstraint constraintExpr)
Creates a
PlacementConstraint given a constraint expression. |
static PlacementConstraint.Or |
PlacementConstraints.or(PlacementConstraint.AbstractConstraint... children)
A disjunction of constraints.
|
void |
PlacementConstraint.TimedPlacementConstraint.setConstraint(PlacementConstraint.AbstractConstraint constraint)
Sets the constraint that has to be satisfied within the time window.
|
static PlacementConstraint.TimedPlacementConstraint |
PlacementConstraints.timedClockConstraint(PlacementConstraint.AbstractConstraint constraint,
long delay,
TimeUnit timeUnit)
Creates a placement constraint that has to be satisfied within a time
window.
|
static PlacementConstraint.TimedPlacementConstraint |
PlacementConstraints.timedOpportunitiesConstraint(PlacementConstraint.AbstractConstraint constraint,
long delay)
Creates a placement constraint that has to be satisfied within a number of
placement opportunities (invocations of the scheduler).
|
Constructor and Description |
---|
And(PlacementConstraint.AbstractConstraint... children) |
Or(PlacementConstraint.AbstractConstraint... children) |
PlacementConstraint(PlacementConstraint.AbstractConstraint constraintExpr) |
TimedPlacementConstraint(PlacementConstraint.AbstractConstraint constraint) |
TimedPlacementConstraint(PlacementConstraint.AbstractConstraint constraint,
long schedulingDelay) |
TimedPlacementConstraint(PlacementConstraint.AbstractConstraint constraint,
long schedulingDelay,
PlacementConstraint.TimedPlacementConstraint.DelayUnit delayUnit) |
Constructor and Description |
---|
And(List<PlacementConstraint.AbstractConstraint> children) |
Or(List<PlacementConstraint.AbstractConstraint> children) |
Modifier and Type | Method and Description |
---|---|
abstract PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.ConstraintParser.parse() |
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.NodeConstraintParser.parse() |
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.TargetConstraintParser.parse() |
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.CardinalityConstraintParser.parse() |
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.ConjunctionConstraintParser.parse() |
static PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.parseExpression(String constraintStr)
Parses a given constraint expression to a
PlacementConstraint.AbstractConstraint ,
this expression can be any valid form of constraint expressions. |
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.ConstraintParser.tryParse() |
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.