org.apache.hadoop.yarn.server.federation.resolver

## 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 Summary

    Constructors
    Constructor and Description
    `AbstractSubClusterResolver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,SubClusterId>` | `getNodeToSubCluster()`
    `Map<String,Set<SubClusterId>>` | `getRackToSubClusters()`
    `SubClusterId` | `getSubClusterForNode(String nodename)` Obtain the sub-cluster that a specified node belongs to.
    `Set<SubClusterId>` | `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, wait`

    - ### Methods inherited from interface org.apache.hadoop.yarn.server.federation.resolver.SubClusterResolver

      `load`

    - ### Methods inherited from interface org.apache.hadoop.conf.Configurable

      `getConf, setConf`

- - ### Constructor Detail

    - #### AbstractSubClusterResolver

          public AbstractSubClusterResolver()

  - ### Method Detail

    - #### 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()

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.