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

public abstract class AbstractSubClusterResolver extends Object implements SubClusterResolver
Partial implementation of SubClusterResolver, containing basic implementations of the read methods.
  • Constructor Details

    • AbstractSubClusterResolver

      public AbstractSubClusterResolver()
  • Method Details

    • getSubClusterForNode

      public SubClusterId getSubClusterForNode(String nodename) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from interface: SubClusterResolver
      Obtain the sub-cluster that a specified node belongs to.
      Specified by:
      getSubClusterForNode in interface SubClusterResolver
      Parameters:
      nodename - the node whose sub-cluster is to be determined
      Returns:
      the sub-cluster as identified by the SubClusterId that 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: SubClusterResolver
      Obtain the sub-clusters that have nodes on a specified rack.
      Specified by:
      getSubClustersForRack in interface SubClusterResolver
      Parameters:
      rackname - the name of the rack
      Returns:
      the sub-clusters as identified by the SubClusterId that 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

      public Map<String,SubClusterId> getNodeToSubCluster()
    • getRackToSubClusters

      public Map<String,Set<SubClusterId>> getRackToSubClusters()