Class ServiceRegistryUtils
java.lang.Object
org.apache.hadoop.yarn.service.utils.ServiceRegistryUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringmkServiceHomePath(String username, String serviceName) Build the path to a service folderstatic StringmkUserHomePath(String username) Build the path to a user home folder;static booleanregistryDNSLookupExists(String addr, String name) Determine whether a DNS lookup exists for a given name.static StringregistryPathForInstance(String instanceName) Get the registry path for an instance under the user's home node
-
Field Details
-
SVC_USERS
- See Also:
-
-
Constructor Details
-
ServiceRegistryUtils
public ServiceRegistryUtils()
-
-
Method Details
-
registryPathForInstance
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
Build the path to a service folder- Parameters:
username- user nameserviceName- service name- Returns:
- the home path to the service
-
mkUserHomePath
Build the path to a user home folder; -
registryDNSLookupExists
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 nullname- name to look up- Returns:
- true if a lookup succeeds for the specified name
-