Class RackResolver

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

@LimitedPrivate({"YARN","MAPREDUCE"}) public final class RackResolver extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    init(org.apache.hadoop.conf.Configuration conf)
     
    static org.apache.hadoop.net.Node
    resolve(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(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(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • 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 - configuration.
      hostName - 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 - configuration.
      hostNames - list of hostName.
      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 - host name.
      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 - list of hostNames.
      Returns:
      nodes Node after resolving the hostnames