Interface NodeLabelsStore

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
FileSystemNodeLabelsStore, NonAppendableFSNodeLabelStore

public interface NodeLabelsStore extends Closeable
Interface class for Node label store.
  • Method Details

    • updateNodeToLabelsMappings

      void updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels) throws IOException
      Store node -> label.
      Parameters:
      nodeToLabels - node to labels mapping.
      Throws:
      IOException - io error occur.
    • storeNewClusterNodeLabels

      void storeNewClusterNodeLabels(List<org.apache.hadoop.yarn.api.records.NodeLabel> labels) throws IOException
      Store new labels.
      Parameters:
      labels - labels.
      Throws:
      IOException - io error occur.
    • removeClusterNodeLabels

      void removeClusterNodeLabels(Collection<String> labels) throws IOException
      Remove labels.
      Parameters:
      labels - labels.
      Throws:
      IOException - io error occur.
    • recover

      void recover() throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Recover labels and node to labels mappings from store, but if ignoreNodeToLabelsMappings is true then node to labels mappings should not be recovered. In case of Distributed NodeLabels setup ignoreNodeToLabelsMappings will be set to true and recover will be invoked as RM will collect the node labels from NM through registration/HB.
      Throws:
      IOException - io error occur.
      org.apache.hadoop.yarn.exceptions.YarnException - exceptions from yarn servers.
    • init

      void init(org.apache.hadoop.conf.Configuration conf, CommonNodeLabelsManager mgr) throws Exception
      Throws:
      Exception