org.apache.hadoop.yarn.util

## Class RackResolver

- java.lang.Object
- - org.apache.hadoop.yarn.util.RackResolver

-     @InterfaceAudience.LimitedPrivate(value={"YARN","MAPREDUCE"})
      public final class RackResolver
      extends Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `init(org.apache.hadoop.conf.Configuration conf)`
    `static List<org.apache.hadoop.net.Node>` | `resolve(org.apache.hadoop.conf.Configuration conf, List<String> hostNames)` Utility method for getting a list of hostname resolved to a list of node in the network topology.
    `static org.apache.hadoop.net.Node` | `resolve(org.apache.hadoop.conf.Configuration conf, String hostName)` Utility method for getting a hostname resolved to a node in the network topology.
    `static List<org.apache.hadoop.net.Node>` | `resolve(List<String> hostNames)` Utility method for getting a list of hostname resolved to a list of node in the network topology.
    `static org.apache.hadoop.net.Node` | `resolve(String hostName)` Utility method for getting a hostname resolved to a node in the network topology.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### init

          public static void init(org.apache.hadoop.conf.Configuration conf)

    - #### resolve

          public static org.apache.hadoop.net.Node resolve(org.apache.hadoop.conf.Configuration conf,
                                                           String hostName)

      Utility method for getting a hostname resolved to a node in the network topology. This method initializes the class with the right resolver implementation.
      Parameters:
        `conf` -
        `hostName` -
      Returns:
        node `Node` after resolving the hostname

    - #### resolve

          public static List<org.apache.hadoop.net.Node> resolve(org.apache.hadoop.conf.Configuration conf,
                                                                 List<String> hostNames)

      Utility method for getting a list of hostname resolved to a list of node in the network topology. This method initializes the class with the right resolver implementation.
      Parameters:
        `conf` -
        `hostNames` -
      Returns:
        nodes `Node` after resolving the hostnames

    - #### resolve

          public static org.apache.hadoop.net.Node resolve(String hostName)

      Utility method for getting a hostname resolved to a node in the network topology. This method doesn't initialize the class. Call `init(Configuration)` explicitly.
      Parameters:
        `hostName` -
      Returns:
        node `Node` after resolving the hostname

    - #### resolve

          public static List<org.apache.hadoop.net.Node> resolve(List<String> hostNames)

      Utility method for getting a list of hostname resolved to a list of node in the network topology. This method doesn't initialize the class. Call `init(Configuration)` explicitly.
      Parameters:
        `hostNames` -
      Returns:
        nodes `Node` after resolving the hostnames

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