org.apache.hadoop.yarn.util.constraint

## Class PlacementConstraintParser.SourceTags

- java.lang.Object
- - org.apache.hadoop.yarn.util.constraint.PlacementConstraintParser.SourceTags

- Enclosing class:
    PlacementConstraintParser

      public static final class PlacementConstraintParser.SourceTags
      extends Object

  A helper class to encapsulate source tags and allocations in the placement specification.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PlacementConstraintParser.SourceTags` | `emptySourceTags()`
    `int` | `getNumOfAllocations()`
    `String` | `getTag()`
    `boolean` | `isEmpty()`
    `static PlacementConstraintParser.SourceTags` | `parseFrom(String expr)` Parses source tags from expression "sourceTags(numOfAllocations)".

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### emptySourceTags

          public static PlacementConstraintParser.SourceTags emptySourceTags()

    - #### isEmpty

          public boolean isEmpty()

    - #### getTag

          public String getTag()

    - #### getNumOfAllocations

          public int getNumOfAllocations()

    - #### parseFrom

          public static PlacementConstraintParser.SourceTags parseFrom(String expr)
                                                                throws PlacementConstraintParseException

      Parses source tags from expression "sourceTags(numOfAllocations)".
      Parameters:
        `expr` -
      Returns:
        source tags, see `PlacementConstraintParser.SourceTags`
      Throws:
        `PlacementConstraintParseException`

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