@InterfaceAudience.Private public final class DNS extends Object
限定符和类型 | 方法和说明 |
---|---|
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.UnknownHostException
public static String getMasterHostname(org.apache.hadoop.conf.Configuration conf) throws UnknownHostException
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.