PlacementConstraintParser.SourceTags (Apache Hadoop YARN API 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.util.constraint, class: PlacementConstraintParser, class: SourceTags

Package 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

  Modifier and Type
  Method
  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 Details

  - ### 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` - expression string.
    Returns:
      source tags, see `PlacementConstraintParser.SourceTags`
    Throws:
      `PlacementConstraintParseException` - when the placement constraint parser fails to parse an expression.