org.apache.hadoop.yarn.api.resource

## Class PlacementConstraint

- java.lang.Object
- - org.apache.hadoop.yarn.api.resource.PlacementConstraint

-     @InterfaceAudience.Public
       @InterfaceStability.Unstable
      public class PlacementConstraint
      extends Object

  `PlacementConstraint` represents a placement constraint for a resource allocation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PlacementConstraint.AbstractConstraint` Abstract class that acts as the superclass of all placement constraint classes.
    `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.
    `static class` | `PlacementConstraint.TargetExpression` Class representing the target expressions that are used in placement constraints.
    `static class` | `PlacementConstraint.TimedPlacementConstraint` Represents a timed placement constraint that has to be satisfied within a time window.
    `static interface` | `PlacementConstraint.Visitable` Interface used to enable the elements of the constraint tree to be visited.
    `static interface` | `PlacementConstraint.Visitor<T>` Visitor API for a constraint tree.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlacementConstraint(PlacementConstraint.AbstractConstraint constraintExpr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `PlacementConstraint.AbstractConstraint` | `getConstraintExpr()` Get the constraint expression of the placement constraint.
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PlacementConstraint

          public PlacementConstraint(PlacementConstraint.AbstractConstraint constraintExpr)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getConstraintExpr

          public PlacementConstraint.AbstractConstraint getConstraintExpr()

      Get the constraint expression of the placement constraint.
      Returns:
        the constraint expression

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.