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
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
FieldsFields inherited from class org.apache.hadoop.yarn.nodelabels.FileSystemNodeLabelsStore
DEFAULT_DIR_NAME, EDITLOG_FILENAME, MIRROR_FILENAMEFields inherited from class org.apache.hadoop.yarn.nodelabels.store.AbstractFSNodeStore
fs, fsWorkingPath, manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidrecover()Recover labels and node to labels mappings from store, but if ignoreNodeToLabelsMappings is true then node to labels mappings should not be recovered.voidremoveClusterNodeLabels(Collection<String> labels) Remove labels.voidstoreNewClusterNodeLabels(List<org.apache.hadoop.yarn.api.records.NodeLabel> labels) Store new labels.voidupdateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId, Set<String>> nodeToLabels) Store node -> label.Methods inherited from class org.apache.hadoop.yarn.nodelabels.FileSystemNodeLabelsStore
initMethods inherited from class org.apache.hadoop.yarn.nodelabels.store.AbstractFSNodeStore
closeFSStore, ensureAppendEditLogFile, ensureCloseEditlogFile, getFs, getFsWorkingPath, getStoreType, initFileSystem, initStore, loadFromMirror, loadManagerFromEditLog, recoverFromStore, setFs, writeToLog
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
NonAppendableFSNodeLabelStore
public NonAppendableFSNodeLabelStore()
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFileSystemNodeLabelsStore- Throws:
IOException
-
recover
Description copied from interface:NodeLabelsStoreRecover 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:
recoverin interfaceNodeLabelsStore- Overrides:
recoverin classFileSystemNodeLabelsStore- 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 IOExceptionDescription copied from interface:NodeLabelsStoreStore node -> label.- Specified by:
updateNodeToLabelsMappingsin interfaceNodeLabelsStore- Overrides:
updateNodeToLabelsMappingsin classFileSystemNodeLabelsStore- 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:NodeLabelsStoreStore new labels.- Specified by:
storeNewClusterNodeLabelsin interfaceNodeLabelsStore- Overrides:
storeNewClusterNodeLabelsin classFileSystemNodeLabelsStore- Parameters:
labels- labels.- Throws:
IOException- io error occur.
-
removeClusterNodeLabels
Description copied from interface:NodeLabelsStoreRemove labels.- Specified by:
removeClusterNodeLabelsin interfaceNodeLabelsStore- Overrides:
removeClusterNodeLabelsin classFileSystemNodeLabelsStore- Parameters:
labels- labels.- Throws:
IOException- io error occur.
-