org.apache.hadoop.yarn.nodelabels

## Class NonAppendableFSNodeLabelStore

- java.lang.Object
- - org.apache.hadoop.yarn.nodelabels.store.AbstractFSNodeStore<CommonNodeLabelsManager>
  - - org.apache.hadoop.yarn.nodelabels.FileSystemNodeLabelsStore
    - - org.apache.hadoop.yarn.nodelabels.NonAppendableFSNodeLabelStore

- All Implemented Interfaces:
    Closeable, AutoCloseable, NodeLabelsStore

      public class NonAppendableFSNodeLabelStore
      extends FileSystemNodeLabelsStore

  Store implementation for Non Appendable File Store.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.hadoop.yarn.nodelabels.store.AbstractFSNodeStore

      `AbstractFSNodeStore.StoreSchema`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.apache.commons.logging.Log` | `LOG`

    - ### Fields inherited from class org.apache.hadoop.yarn.nodelabels.FileSystemNodeLabelsStore

      `DEFAULT_DIR_NAME, EDITLOG_FILENAME, MIRROR_FILENAME`

    - ### Fields inherited from class org.apache.hadoop.yarn.nodelabels.store.AbstractFSNodeStore

      `fs, fsWorkingPath, manager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NonAppendableFSNodeLabelStore()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `recover()` Recover labels and node to labels mappings from store, but if ignoreNodeToLabelsMappings is true then node to labels mappings should not be recovered.
    `void` | `removeClusterNodeLabels(Collection<String> labels)` Remove labels.
    `void` | `storeNewClusterNodeLabels(List<org.apache.hadoop.yarn.api.records.NodeLabel> labels)` Store new labels.
    `void` | `updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels)` Store node -> label.

    - ### Methods inherited from class org.apache.hadoop.yarn.nodelabels.FileSystemNodeLabelsStore

      `init`

    - ### Methods inherited from class org.apache.hadoop.yarn.nodelabels.store.AbstractFSNodeStore

      `closeFSStore, ensureAppendEditLogFile, ensureCloseEditlogFile, getFs, getFsWorkingPath, getStoreType, initFileSystem, initStore, loadFromMirror, loadManagerFromEditLog, recoverFromStore, setFs, writeToLog`

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

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

- - ### Field Detail

    - #### LOG

          protected static final org.apache.commons.logging.Log LOG

  - ### Constructor Detail

    - #### NonAppendableFSNodeLabelStore

          public NonAppendableFSNodeLabelStore()

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `FileSystemNodeLabelsStore`
      Throws:
        `IOException`

    - #### recover

          public void recover()
                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                              IOException

      Description copied from interface: `NodeLabelsStore`
      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.
      Specified by:
        `recover` in interface `NodeLabelsStore`
      Overrides:
        `recover` in class `FileSystemNodeLabelsStore`
      Throws:
        `org.apache.hadoop.yarn.exceptions.YarnException`
        `IOException`

    - #### updateNodeToLabelsMappings

          public void updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels)
                                          throws IOException

      Description copied from interface: `NodeLabelsStore`
      Store node -> label.
      Specified by:
        `updateNodeToLabelsMappings` in interface `NodeLabelsStore`
      Overrides:
        `updateNodeToLabelsMappings` in class `FileSystemNodeLabelsStore`
      Throws:
        `IOException`

    - #### storeNewClusterNodeLabels

          public void storeNewClusterNodeLabels(List<org.apache.hadoop.yarn.api.records.NodeLabel> labels)
                                         throws IOException

      Description copied from interface: `NodeLabelsStore`
      Store new labels.
      Specified by:
        `storeNewClusterNodeLabels` in interface `NodeLabelsStore`
      Overrides:
        `storeNewClusterNodeLabels` in class `FileSystemNodeLabelsStore`
      Throws:
        `IOException`

    - #### removeClusterNodeLabels

          public void removeClusterNodeLabels(Collection<String> labels)
                                       throws IOException

      Description copied from interface: `NodeLabelsStore`
      Remove labels.
      Specified by:
        `removeClusterNodeLabels` in interface `NodeLabelsStore`
      Overrides:
        `removeClusterNodeLabels` in class `FileSystemNodeLabelsStore`
      Throws:
        `IOException`

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