NonAppendableFSNodeLabelStore (Apache Hadoop YARN Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.nodelabels, class: NonAppendableFSNodeLabelStore

Package 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
  Description
  `protected static final org.slf4j.Logger`
  `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
  Description
  `NonAppendableFSNodeLabelStore()`

- ## Method Summary

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

  - ### LOG

    protected static final org.slf4j.Logger LOG

- ## Constructor Details

  - ### NonAppendableFSNodeLabelStore

    public NonAppendableFSNodeLabelStore()

- ## Method Details

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    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` - exceptions from yarn servers.
      `IOException` - io error occur.

  - ### 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`
    Parameters:
      `nodeToLabels` - node to labels mapping.
    Throws:
      `IOException` - io error occur.

  - ### 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`
    Parameters:
      `labels` - labels.
    Throws:
      `IOException` - io error occur.

  - ### 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`
    Parameters:
      `labels` - labels.
    Throws:
      `IOException` - io error occur.