DomainNameResolverFactory (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.net, class: DomainNameResolverFactory

Package org.apache.hadoop.net

# 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 Summary

  Modifier and Type
  Method
  Description
  `static DomainNameResolver`
  `newInstance(Configuration conf, String configKey)`
  This function gets the instance based on the config.
  `static DomainNameResolver`
  `newInstance(Configuration conf, String host, String configKey)`
  `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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.