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.
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
    • manager

      protected M manager
    • fsWorkingPath

      protected org.apache.hadoop.fs.Path fsWorkingPath
    • fs

      protected org.apache.hadoop.fs.FileSystem fs
  • Constructor Details

  • Method Details

    • 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()