Package org.apache.hadoop.yarn.util
Class RackResolver
java.lang.Object
org.apache.hadoop.yarn.util.RackResolver
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit(org.apache.hadoop.conf.Configuration conf) static org.apache.hadoop.net.NodeUtility method for getting a hostname resolved to a node in the network topology.static List<org.apache.hadoop.net.Node>Utility method for getting a list of hostname resolved to a list of node in the network topology.static org.apache.hadoop.net.NodeUtility method for getting a hostname resolved to a node in the network topology.static List<org.apache.hadoop.net.Node>Utility method for getting a list of hostname resolved to a list of node in the network topology.
-
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
Nodeafter 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
Nodeafter resolving the hostnames
-
resolve
Utility method for getting a hostname resolved to a node in the network topology. This method doesn't initialize the class. Callinit(Configuration)explicitly.- Parameters:
hostName- host name.- Returns:
- node
Nodeafter resolving the hostname
-
resolve
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. Callinit(Configuration)explicitly.- Parameters:
hostNames- list of hostNames.- Returns:
- nodes
Nodeafter resolving the hostnames
-