java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ConfiguredNodeLabels

public class ConfiguredNodeLabels extends Object
Contains node labels for all queues extracted from configuration properties. A queue has a configured node label if it has a property set with an accessible-node-labels prefix. Example: yarn.scheduler.capacity.root.accessible-node-labels.test-label.capacity
  • Constructor Details

  • Method Details

    • getLabelsByQueue

      public Set<String> getLabelsByQueue(String queuePath)
      Returns a set of configured node labels for a queue. If no labels are set for a queue, it defaults to a one element immutable collection containing empty label.
      Parameters:
      queuePath - path of the queue
      Returns:
      configured node labels or an immutable set containing the empty label
    • setLabelsByQueue

      public void setLabelsByQueue(String queuePath, Collection<String> nodeLabels)
      Set node labels for a specific queue.
      Parameters:
      queuePath - path of the queue
      nodeLabels - configured node labels to set
    • getAllConfiguredLabels

      public Set<String> getAllConfiguredLabels()
      Get all configured node labels aggregated from each queue.
      Returns:
      all node labels