Modifier and Type | Class and Description |
---|---|
static class |
DNS.ServerType |
Modifier and Type | Field and Description |
---|---|
private static Method |
GET_DEFAULT_HOST_METHOD |
private static boolean |
HAS_NEW_DNS_GET_DEFAULT_HOST_API |
static String |
MASTER_HOSTNAME_KEY |
static String |
RS_HOSTNAME_KEY
Deprecated.
since 2.4.0 and will be removed in 4.0.0. Use
UNSAFE_RS_HOSTNAME_KEY
instead. |
static String |
UNSAFE_RS_HOSTNAME_KEY |
Modifier | Constructor and Description |
---|---|
private |
DNS() |
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 |
getHostname(org.apache.hadoop.conf.Configuration conf,
DNS.ServerType serverType)
Get the configured hostname for a given ServerType.
|
@InterfaceAudience.LimitedPrivate(value="Configuration") public static final String UNSAFE_RS_HOSTNAME_KEY
@InterfaceAudience.LimitedPrivate(value="Configuration") public static final String MASTER_HOSTNAME_KEY
private static boolean HAS_NEW_DNS_GET_DEFAULT_HOST_API
private static Method GET_DEFAULT_HOST_METHOD
@Deprecated @InterfaceAudience.LimitedPrivate(value="Configuration") public static final String RS_HOSTNAME_KEY
UNSAFE_RS_HOSTNAME_KEY
instead.private DNS()
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 getHostname(@NonNull org.apache.hadoop.conf.Configuration conf, @NonNull DNS.ServerType serverType) throws UnknownHostException
conf
- Configuration to look up.serverType
- ServerType to look up in the configuration for overrides.UnknownHostException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.