org.apache.hadoop.yarn.nodelabels.store

## Class AbstractFSNodeStore<M>

- java.lang.Object
- - org.apache.hadoop.yarn.nodelabels.store.AbstractFSNodeStore<M>

- Type Parameters:
    `M` - manager filesystem store.Currently nodelabel will use CommonNodeLabelManager.
  Direct Known Subclasses:
    FileSystemNodeLabelsStore

      public abstract class AbstractFSNodeStore<M>
      extends Object

  Abstract class for File System based store.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AbstractFSNodeStore.StoreSchema` Filesystem store schema define the log name and mirror name.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.hadoop.fs.FileSystem` | `fs`
    `protected org.apache.hadoop.fs.Path` | `fsWorkingPath`
    `protected static org.apache.commons.logging.Log` | `LOG`
    `protected M` | `manager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFSNodeStore(FSStoreOpHandler.StoreType storeType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `closeFSStore()`
    `protected void` | `ensureAppendEditLogFile()`
    `protected void` | `ensureCloseEditlogFile()`
    `org.apache.hadoop.fs.FileSystem` | `getFs()`
    `org.apache.hadoop.fs.Path` | `getFsWorkingPath()`
    `protected FSStoreOpHandler.StoreType` | `getStoreType()`
    `void` | `initFileSystem(org.apache.hadoop.conf.Configuration conf)`
    `protected void` | `initStore(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path fsStorePath, AbstractFSNodeStore.StoreSchema schma, M mgr)`
    `protected void` | `loadFromMirror(org.apache.hadoop.fs.Path newMirrorPath, org.apache.hadoop.fs.Path oldMirrorPath)`
    `protected void` | `loadManagerFromEditLog(org.apache.hadoop.fs.Path editPath)`
    `protected void` | `recoverFromStore()`
    `void` | `setFs(org.apache.hadoop.fs.FileSystem fs)`
    `protected void` | `writeToLog(FSNodeStoreLogOp op)`

    - ### 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

    - #### manager

          protected M manager

    - #### fsWorkingPath

          protected org.apache.hadoop.fs.Path fsWorkingPath

    - #### fs

          protected org.apache.hadoop.fs.FileSystem fs

  - ### Constructor Detail

    - #### AbstractFSNodeStore

          public AbstractFSNodeStore(FSStoreOpHandler.StoreType storeType)

  - ### Method Detail

    - #### initStore

          protected void initStore(org.apache.hadoop.conf.Configuration conf,
                                   org.apache.hadoop.fs.Path fsStorePath,
                                   AbstractFSNodeStore.StoreSchema schma,
                                   M mgr)
                            throws IOException

      Throws:
        `IOException`

    - #### initFileSystem

          public void initFileSystem(org.apache.hadoop.conf.Configuration conf)
                              throws IOException

      Throws:
        `IOException`

    - #### writeToLog

          protected void writeToLog(FSNodeStoreLogOp op)
                             throws IOException

      Throws:
        `IOException`

    - #### ensureAppendEditLogFile

          protected void ensureAppendEditLogFile()
                                          throws IOException

      Throws:
        `IOException`

    - #### ensureCloseEditlogFile

          protected void ensureCloseEditlogFile()
                                         throws IOException

      Throws:
        `IOException`

    - #### loadFromMirror

          protected void loadFromMirror(org.apache.hadoop.fs.Path newMirrorPath,
                                        org.apache.hadoop.fs.Path oldMirrorPath)
                                 throws IOException

      Throws:
        `IOException`

    - #### getStoreType

          protected FSStoreOpHandler.StoreType getStoreType()

    - #### getFsWorkingPath

          public org.apache.hadoop.fs.Path getFsWorkingPath()

    - #### recoverFromStore

          protected void recoverFromStore()
                                   throws IOException

      Throws:
        `IOException`

    - #### loadManagerFromEditLog

          protected void loadManagerFromEditLog(org.apache.hadoop.fs.Path editPath)
                                         throws IOException

      Throws:
        `IOException`

    - #### getFs

          public org.apache.hadoop.fs.FileSystem getFs()

    - #### setFs

          public void setFs(org.apache.hadoop.fs.FileSystem fs)

    - #### closeFSStore

          protected void closeFSStore()

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