Interface NodeLabelsStore
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
FileSystemNodeLabelsStore,NonAppendableFSNodeLabelStore
Interface class for Node label store.
-
Method Summary
Modifier and TypeMethodDescriptionvoidinit(org.apache.hadoop.conf.Configuration conf, CommonNodeLabelsManager mgr) 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.
-
Method Details
-
updateNodeToLabelsMappings
void updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId, Set<String>> nodeToLabels) throws IOExceptionStore node -> label.- Parameters:
nodeToLabels- node to labels mapping.- Throws:
IOException- io error occur.
-
storeNewClusterNodeLabels
void storeNewClusterNodeLabels(List<org.apache.hadoop.yarn.api.records.NodeLabel> labels) throws IOException Store new labels.- Parameters:
labels- labels.- Throws:
IOException- io error occur.
-
removeClusterNodeLabels
Remove labels.- Parameters:
labels- labels.- Throws:
IOException- io error occur.
-
recover
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.- Throws:
IOException- io error occur.org.apache.hadoop.yarn.exceptions.YarnException- exceptions from yarn servers.
-
init
- Throws:
Exception
-