org.apache.hadoop.yarn.nodelabels
Class NodeLabelsStore

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

public abstract class NodeLabelsStore
extends Object
implements Closeable


Field Summary
protected  org.apache.hadoop.conf.Configuration conf
           
protected  CommonNodeLabelsManager mgr
           
 
Constructor Summary
NodeLabelsStore(CommonNodeLabelsManager mgr)
           
 
Method Summary
 CommonNodeLabelsManager getNodeLabelsManager()
           
 void init(org.apache.hadoop.conf.Configuration conf)
           
abstract  void recover()
          Recover labels and node to labels mappings from store
abstract  void removeClusterNodeLabels(Collection<String> labels)
          Remove labels
abstract  void storeNewClusterNodeLabels(Set<String> label)
          Store new labels
abstract  void updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels)
          Store node -> label
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Field Detail

mgr

protected final CommonNodeLabelsManager mgr

conf

protected org.apache.hadoop.conf.Configuration conf
Constructor Detail

NodeLabelsStore

public NodeLabelsStore(CommonNodeLabelsManager mgr)
Method Detail

updateNodeToLabelsMappings

public abstract void updateNodeToLabelsMappings(Map<org.apache.hadoop.yarn.api.records.NodeId,Set<String>> nodeToLabels)
                                         throws IOException
Store node -> label

Throws:
IOException

storeNewClusterNodeLabels

public abstract void storeNewClusterNodeLabels(Set<String> label)
                                        throws IOException
Store new labels

Throws:
IOException

removeClusterNodeLabels

public abstract void removeClusterNodeLabels(Collection<String> labels)
                                      throws IOException
Remove labels

Throws:
IOException

recover

public abstract void recover()
                      throws IOException
Recover labels and node to labels mappings from store

Parameters:
conf -
Throws:
IOException

init

public void init(org.apache.hadoop.conf.Configuration conf)
          throws Exception
Throws:
Exception

getNodeLabelsManager

public CommonNodeLabelsManager getNodeLabelsManager()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.