| 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 | 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 | Description |
|---|---|---|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.cardinality(java.lang.String scope,
int minCardinality,
int maxCardinality,
java.lang.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(java.lang.String scope,
java.lang.String namespace,
int minCardinality,
int maxCardinality,
java.lang.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(java.lang.String scope,
int maxCardinality,
java.lang.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(java.lang.String scope,
java.lang.String tagNamespace,
int maxCardinality,
java.lang.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(java.lang.String scope,
int minCardinality,
java.lang.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(java.lang.String scope,
java.lang.String namespace,
int minCardinality,
java.lang.String... allocationTags) |
Similar to
PlacementConstraints.minCardinality(String, int, String...), but let you
attach a namespace to the allocation tags. |
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.targetCardinality(java.lang.String scope,
int minCardinality,
int maxCardinality,
PlacementConstraint.TargetExpression... targetExpressions) |
This constraint generalizes the cardinality and target constraints.
|
static PlacementConstraint.AbstractConstraint |
PlacementConstraints.targetIn(java.lang.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(java.lang.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(java.lang.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 | Description |
|---|---|---|
java.util.List<PlacementConstraint.AbstractConstraint> |
PlacementConstraint.And.getChildren() |
|
java.util.List<PlacementConstraint.AbstractConstraint> |
PlacementConstraint.Or.getChildren() |
| Modifier and Type | Method | 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,
java.util.concurrent.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 | 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 | Description |
|---|---|
And(java.util.List<PlacementConstraint.AbstractConstraint> children) |
|
Or(java.util.List<PlacementConstraint.AbstractConstraint> children) |
| Modifier and Type | Method | Description |
|---|---|---|
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.CardinalityConstraintParser.parse() |
|
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.ConjunctionConstraintParser.parse() |
|
abstract PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.ConstraintParser.parse() |
|
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.NodeConstraintParser.parse() |
|
PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.TargetConstraintParser.parse() |
|
static PlacementConstraint.AbstractConstraint |
PlacementConstraintParser.parseExpression(java.lang.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–2025 Apache Software Foundation. All rights reserved.