Class AbstractSubClusterResolver
java.lang.Object
org.apache.hadoop.yarn.server.federation.resolver.AbstractSubClusterResolver
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,SubClusterResolver
- Direct Known Subclasses:
DefaultSubClusterResolverImpl
Partial implementation of
SubClusterResolver, containing basic
implementations of the read methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSubClusterForNode(String nodename) Obtain the sub-cluster that a specified node belongs to.getSubClustersForRack(String rackname) Obtain the sub-clusters that have nodes on a specified rack.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConfMethods inherited from interface org.apache.hadoop.yarn.server.federation.resolver.SubClusterResolver
load
-
Constructor Details
-
AbstractSubClusterResolver
public AbstractSubClusterResolver()
-
-
Method Details
-
getSubClusterForNode
public SubClusterId getSubClusterForNode(String nodename) throws org.apache.hadoop.yarn.exceptions.YarnException Description copied from interface:SubClusterResolverObtain the sub-cluster that a specified node belongs to.- Specified by:
getSubClusterForNodein interfaceSubClusterResolver- Parameters:
nodename- the node whose sub-cluster is to be determined- Returns:
- the sub-cluster as identified by the
SubClusterIdthat the node belongs to - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if the node's sub-cluster cannot be resolved
-
getSubClustersForRack
public Set<SubClusterId> getSubClustersForRack(String rackname) throws org.apache.hadoop.yarn.exceptions.YarnException Description copied from interface:SubClusterResolverObtain the sub-clusters that have nodes on a specified rack.- Specified by:
getSubClustersForRackin interfaceSubClusterResolver- Parameters:
rackname- the name of the rack- Returns:
- the sub-clusters as identified by the
SubClusterIdthat have nodes on the given rack - Throws:
org.apache.hadoop.yarn.exceptions.YarnException- if the sub-cluster of any node on the rack cannot be resolved, or if the rack name is not recognized
-
getNodeToSubCluster
-
getRackToSubClusters
-