Package org.apache.hadoop.yarn.api.resource

Class PlacementConstraint

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

@Public @Unstable public class PlacementConstraint extends Object
PlacementConstraint represents a placement constraint for a resource allocation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint
    Abstract class that acts as the superclass of all placement constraint classes.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.And
    Class that represents a composite constraint that is a conjunction of other constraints.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.CardinalityConstraint
    Class that represents a cardinality constraint.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.CompositeConstraint<R extends org.apache.hadoop.yarn.api.resource.PlacementConstraint.Visitable>
    Class that represents composite constraints, which comprise other constraints, forming a constraint tree.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.DelayedOr
    Class that represents a composite constraint that comprises a list of timed placement constraints (see PlacementConstraint.TimedPlacementConstraint).
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.Or
    Class that represents a composite constraint that is a disjunction of other constraints.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.SingleConstraint
    Consider a set of nodes N that belongs to the scope specified in the constraint.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetConstraint
    Class that represents a target constraint.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.TargetExpression
    Class representing the target expressions that are used in placement constraints.
    static class 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.TimedPlacementConstraint
    Represents a timed placement constraint that has to be satisfied within a time window.
    static interface 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.Visitable
    Interface used to enable the elements of the constraint tree to be visited.
    static interface 
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.Visitor<T>
    Visitor API for a constraint tree.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlacementConstraint(org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint constraintExpr)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint
    Get the constraint expression of the placement constraint.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PlacementConstraint

      public PlacementConstraint(org.apache.hadoop.yarn.api.resource.PlacementConstraint.AbstractConstraint constraintExpr)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getConstraintExpr

      public org.apache.hadoop.yarn.api.resource.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