Class DomainNameResolverFactory

java.lang.Object
org.apache.hadoop.net.DomainNameResolverFactory

@Private @Evolving public final class DomainNameResolverFactory extends Object
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 Details

    • newInstance

      public static DomainNameResolver newInstance(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.
      Parameters:
      conf - Configuration to get the resolver from.
      uri - the url that the resolver will be used against
      configKey - The config key name suffixed with the nameservice/yarnservice.
      Returns:
      Domain name resolver.
    • newInstance

      public static DomainNameResolver newInstance(Configuration conf, String host, String configKey)
    • newInstance

      public static DomainNameResolver newInstance(Configuration conf, String configKey)
      This function gets the instance based on the config.
      Parameters:
      conf - Configuration
      configKey - config key name.
      Returns:
      Domain name resolver.