public class FileSystemNodeLabelsStore extends NodeLabelsStore
Modifier and Type | Class and Description |
---|---|
protected static class |
FileSystemNodeLabelsStore.SerializedLogType |
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_DIR_NAME |
protected static String |
EDITLOG_FILENAME |
protected static org.apache.commons.logging.Log |
LOG |
protected static String |
MIRROR_FILENAME |
mgr
Constructor and Description |
---|
FileSystemNodeLabelsStore(CommonNodeLabelsManager mgr) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
init(org.apache.hadoop.conf.Configuration conf) |
void |
recover()
Recover labels and node to labels mappings from store
|
void |
removeClusterNodeLabels(Collection<String> labels)
Remove labels
|
void |
storeNewClusterNodeLabels(Set<String> labels)
Store new labels
|
void |
updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels)
Store node -> label
|
getNodeLabelsManager
protected static final org.apache.commons.logging.Log LOG
protected static final String DEFAULT_DIR_NAME
protected static final String MIRROR_FILENAME
protected static final String EDITLOG_FILENAME
public FileSystemNodeLabelsStore(CommonNodeLabelsManager mgr)
public void init(org.apache.hadoop.conf.Configuration conf) throws Exception
init
in class NodeLabelsStore
Exception
public void close() throws IOException
IOException
public void updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels) throws IOException
NodeLabelsStore
updateNodeToLabelsMappings
in class NodeLabelsStore
IOException
public void storeNewClusterNodeLabels(Set<String> labels) throws IOException
NodeLabelsStore
storeNewClusterNodeLabels
in class NodeLabelsStore
IOException
public void removeClusterNodeLabels(Collection<String> labels) throws IOException
NodeLabelsStore
removeClusterNodeLabels
in class NodeLabelsStore
IOException
public void recover() throws IOException
NodeLabelsStore
recover
in class NodeLabelsStore
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.