|
@@ -20,11 +20,16 @@ package org.apache.hadoop.net;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.net.UnknownHostException;
|
|
import java.net.UnknownHostException;
|
|
|
|
|
|
|
|
+import org.apache.hadoop.classification.InterfaceAudience;
|
|
|
|
+import org.apache.hadoop.classification.InterfaceStability;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* An interface that should be implemented to allow pluggable
|
|
* An interface that should be implemented to allow pluggable
|
|
* DNS-name/IP-address to RackID resolvers.
|
|
* DNS-name/IP-address to RackID resolvers.
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
|
|
+@InterfaceAudience.Public
|
|
|
|
+@InterfaceStability.Evolving
|
|
public interface DNSToSwitchMapping {
|
|
public interface DNSToSwitchMapping {
|
|
/**
|
|
/**
|
|
* Resolves a list of DNS-names/IP-addresses and returns back a list of
|
|
* Resolves a list of DNS-names/IP-addresses and returns back a list of
|
|
@@ -41,22 +46,4 @@ public interface DNSToSwitchMapping {
|
|
*/
|
|
*/
|
|
public List<String> resolve(List<String> names);
|
|
public List<String> resolve(List<String> names);
|
|
|
|
|
|
- /**
|
|
|
|
- * Resolves a list of DNS-names/IP-addresses and returns back a list of
|
|
|
|
- * switch information (network paths). One-to-one correspondence must be
|
|
|
|
- * maintained between the elements in the lists.
|
|
|
|
- * Consider an element in the argument list - x.y.com. The switch information
|
|
|
|
- * that is returned must be a network path of the form /foo/rack,
|
|
|
|
- * where / is the root, and 'foo' is the switch where 'rack' is connected.
|
|
|
|
- * Note the hostname/ip-address is not part of the returned path.
|
|
|
|
- * The network topology of the cluster would determine the number of
|
|
|
|
- * components in the network path. Unlike 'resolve', names must be
|
|
|
|
- * resolvable
|
|
|
|
- * @param names
|
|
|
|
- * @return list of resolved network paths
|
|
|
|
- * @throws UnknownHostException if any hosts are not resolvable
|
|
|
|
- */
|
|
|
|
- public List<String> resolveValidHosts(List<String> names)
|
|
|
|
- throws UnknownHostException;
|
|
|
|
-
|
|
|
|
}
|
|
}
|