public class LlapFixedRegistryImpl extends Object implements ServiceRegistry<LlapServiceInstance>
| Modifier and Type | Class and Description |
|---|---|
class |
LlapFixedRegistryImpl.FixedServiceInstance
A single instance in an Llap Service.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
FIXED_REGISTRY_RESOLVE_HOST_NAMES |
| Constructor and Description |
|---|
LlapFixedRegistryImpl(String hosts,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId() |
LlapServiceInstanceSet |
getInstances(String component,
long timeoutMs)
Client API to get the list of instances registered via the current registry key.
|
static String |
getWorkerIdentity(String host) |
String |
register()
Register the current instance - the implementation takes care of the endpoints to register.
|
void |
registerStateChangeListener(ServiceInstanceStateChangeListener listener)
Adds state change listeners for service instances.
|
void |
start()
Start the service registry
|
void |
stop()
Stop the service registry
|
String |
toString() |
void |
unregister()
Remove the current registration cleanly (implementation defined cleanup)
|
void |
updateRegistration(Iterable<Map.Entry<String,String>> attributes)
Update the current registration with the given attributes.
|
@InterfaceAudience.Private public static final String FIXED_REGISTRY_RESOLVE_HOST_NAMES
public LlapFixedRegistryImpl(String hosts, org.apache.hadoop.conf.Configuration conf)
public void start()
throws IOException
ServiceRegistrystart in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic void stop()
throws IOException
ServiceRegistrystop in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic String register() throws IOException
ServiceRegistryregister in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic void unregister()
throws IOException
ServiceRegistryunregister in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic void updateRegistration(Iterable<Map.Entry<String,String>> attributes) throws IOException
ServiceRegistryupdateRegistration in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic LlapServiceInstanceSet getInstances(String component, long timeoutMs) throws IOException
ServiceRegistrygetInstances in interface ServiceRegistry<LlapServiceInstance>timeoutMs - The time to wait for the cluster to be ready, if it's not
started yet. 0 means do not wait.IOExceptionpublic void registerStateChangeListener(ServiceInstanceStateChangeListener listener) throws IOException
ServiceRegistryregisterStateChangeListener in interface ServiceRegistry<LlapServiceInstance>listener - - state change listenerIOExceptionpublic org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
throws IOException
getApplicationId in interface ServiceRegistry<LlapServiceInstance>IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.