Class ServiceRegistryUtils

java.lang.Object
org.apache.hadoop.yarn.service.utils.ServiceRegistryUtils

public class ServiceRegistryUtils extends Object
  • Field Details

  • Constructor Details

    • ServiceRegistryUtils

      public ServiceRegistryUtils()
  • Method Details

    • registryPathForInstance

      public static String registryPathForInstance(String instanceName)
      Get the registry path for an instance under the user's home node
      Parameters:
      instanceName - application instance
      Returns:
      a path to the registry location for this application instance.
    • mkServiceHomePath

      public static String mkServiceHomePath(String username, String serviceName)
      Build the path to a service folder
      Parameters:
      username - user name
      serviceName - service name
      Returns:
      the home path to the service
    • mkUserHomePath

      public static String mkUserHomePath(String username)
      Build the path to a user home folder;
    • registryDNSLookupExists

      public static boolean registryDNSLookupExists(String addr, String name)
      Determine whether a DNS lookup exists for a given name. If a DNS server address is provided, the lookup will be performed against this DNS server. This option is provided because it may be desirable to perform the lookup against Registry DNS directly to avoid caching of negative responses that may be performed by other DNS servers, thereby allowing the lookup to succeed sooner.
      Parameters:
      addr - host:port dns address, or null
      name - name to look up
      Returns:
      true if a lookup succeeds for the specified name