Package org.apache.hadoop.net
Class DomainNameResolverFactory
java.lang.Object
org.apache.hadoop.net.DomainNameResolverFactory
This class creates the DomainNameResolver instance based on the config.
It can either create the default resolver for the whole resolving for
hadoop or create individual resolver per nameservice or yarn.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DomainNameResolvernewInstance(Configuration conf, String configKey) This function gets the instance based on the config.static DomainNameResolvernewInstance(Configuration conf, String host, String configKey) static DomainNameResolvernewInstance(Configuration conf, URI uri, String configKey) Create a domain name resolver to convert the domain name in the config to the actual IP addresses of the Namenode/Router/RM.
-
Method Details
-
newInstance
Create a domain name resolver to convert the domain name in the config to the actual IP addresses of the Namenode/Router/RM.- Parameters:
conf- Configuration to get the resolver from.uri- the url that the resolver will be used againstconfigKey- The config key name suffixed with the nameservice/yarnservice.- Returns:
- Domain name resolver.
-
newInstance
-
newInstance
This function gets the instance based on the config.- Parameters:
conf- ConfigurationconfigKey- config key name.- Returns:
- Domain name resolver.
-