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(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<NodeId,Set<String>> nodeToLabels)
Store node -> label
|
getNodeLabelsManagerprotected 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(Configuration conf) throws Exception
init in class NodeLabelsStoreExceptionpublic void close()
throws IOException
IOExceptionpublic void updateNodeToLabelsMappings(Map<NodeId,Set<String>> nodeToLabels) throws IOException
NodeLabelsStoreupdateNodeToLabelsMappings in class NodeLabelsStoreIOExceptionpublic void storeNewClusterNodeLabels(Set<String> labels) throws IOException
NodeLabelsStorestoreNewClusterNodeLabels in class NodeLabelsStoreIOExceptionpublic void removeClusterNodeLabels(Collection<String> labels) throws IOException
NodeLabelsStoreremoveClusterNodeLabels in class NodeLabelsStoreIOExceptionpublic void recover()
throws IOException
NodeLabelsStorerecover in class NodeLabelsStoreIOExceptionCopyright © 2018 CERN. All Rights Reserved.