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
Abstract class for File System based store.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFilesystem store schema define the log name and mirror name. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.hadoop.fs.FileSystemprotected org.apache.hadoop.fs.Pathprotected static final org.slf4j.Loggerprotected M -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidorg.apache.hadoop.fs.FileSystemgetFs()org.apache.hadoop.fs.Pathprotected FSStoreOpHandler.StoreTypevoidinitFileSystem(org.apache.hadoop.conf.Configuration conf) protected voidinitStore(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path fsStorePath, AbstractFSNodeStore.StoreSchema schma, M mgr) protected voidloadFromMirror(org.apache.hadoop.fs.Path newMirrorPath, org.apache.hadoop.fs.Path oldMirrorPath) protected voidloadManagerFromEditLog(org.apache.hadoop.fs.Path editPath) protected voidvoidsetFs(org.apache.hadoop.fs.FileSystem fs) protected void
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
manager
-
fsWorkingPath
protected org.apache.hadoop.fs.Path fsWorkingPath -
fs
protected org.apache.hadoop.fs.FileSystem fs
-
-
Constructor Details
-
AbstractFSNodeStore
-
-
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
- Throws:
IOException
-
writeToLog
- Throws:
IOException
-
ensureAppendEditLogFile
- Throws:
IOException
-
ensureCloseEditlogFile
- Throws:
IOException
-
loadFromMirror
protected void loadFromMirror(org.apache.hadoop.fs.Path newMirrorPath, org.apache.hadoop.fs.Path oldMirrorPath) throws IOException - Throws:
IOException
-
getStoreType
-
getFsWorkingPath
public org.apache.hadoop.fs.Path getFsWorkingPath() -
recoverFromStore
- Throws:
IOException
-
loadManagerFromEditLog
- Throws:
IOException
-
getFs
public org.apache.hadoop.fs.FileSystem getFs() -
setFs
public void setFs(org.apache.hadoop.fs.FileSystem fs) -
closeFSStore
protected void closeFSStore()
-