@InterfaceAudience.Private public final class DNS extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getDefaultHost(String strInterface,
String nameserver)
Wrapper around DNS.getDefaultHost(String, String), calling
DNS.getDefaultHost(String, String, boolean) when available.
|
static String |
getMasterHostname(org.apache.hadoop.conf.Configuration conf) |
public static String getDefaultHost(String strInterface, String nameserver) throws UnknownHostException
strInterface - The network interface to query.nameserver - The DNS host name.UnknownHostExceptionpublic static String getMasterHostname(org.apache.hadoop.conf.Configuration conf) throws UnknownHostException
UnknownHostExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.