org.apache.hadoop.yarn.nodelabels
Class FileSystemNodeLabelsStore

java.lang.Object
  extended by org.apache.hadoop.yarn.nodelabels.NodeLabelsStore
      extended by org.apache.hadoop.yarn.nodelabels.FileSystemNodeLabelsStore
All Implemented Interfaces:
Closeable

public class FileSystemNodeLabelsStore
extends NodeLabelsStore


Nested Class Summary
protected static class FileSystemNodeLabelsStore.SerializedLogType
           
 
Field Summary
protected static String DEFAULT_DIR_NAME
           
protected static String EDITLOG_FILENAME
           
protected static org.apache.commons.logging.Log LOG
           
protected static String MIRROR_FILENAME
           
 
Fields inherited from class org.apache.hadoop.yarn.nodelabels.NodeLabelsStore
conf, mgr
 
Constructor Summary
FileSystemNodeLabelsStore(CommonNodeLabelsManager mgr)
           
 
Method Summary
 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
 
Methods inherited from class org.apache.hadoop.yarn.nodelabels.NodeLabelsStore
getNodeLabelsManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

DEFAULT_DIR_NAME

protected static final String DEFAULT_DIR_NAME
See Also:
Constant Field Values

MIRROR_FILENAME

protected static final String MIRROR_FILENAME
See Also:
Constant Field Values

EDITLOG_FILENAME

protected static final String EDITLOG_FILENAME
See Also:
Constant Field Values
Constructor Detail

FileSystemNodeLabelsStore

public FileSystemNodeLabelsStore(CommonNodeLabelsManager mgr)
Method Detail

init

public void init(org.apache.hadoop.conf.Configuration conf)
          throws Exception
Overrides:
init in class NodeLabelsStore
Throws:
Exception

close

public void close()
           throws IOException
Throws:
IOException

updateNodeToLabelsMappings

public void updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels)
                                throws IOException
Description copied from class: NodeLabelsStore
Store node -> label

Specified by:
updateNodeToLabelsMappings in class NodeLabelsStore
Throws:
IOException

storeNewClusterNodeLabels

public void storeNewClusterNodeLabels(Set<String> labels)
                               throws IOException
Description copied from class: NodeLabelsStore
Store new labels

Specified by:
storeNewClusterNodeLabels in class NodeLabelsStore
Throws:
IOException

removeClusterNodeLabels

public void removeClusterNodeLabels(Collection<String> labels)
                             throws IOException
Description copied from class: NodeLabelsStore
Remove labels

Specified by:
removeClusterNodeLabels in class NodeLabelsStore
Throws:
IOException

recover

public void recover()
             throws IOException
Description copied from class: NodeLabelsStore
Recover labels and node to labels mappings from store

Specified by:
recover in class NodeLabelsStore
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.