public class LlapZookeeperRegistryImpl extends ZkRegistryBase<LlapServiceInstance> implements ServiceRegistry<LlapServiceInstance>
| Modifier and Type | Class and Description |
|---|---|
static class |
LlapZookeeperRegistryImpl.ConfigChangeLockResult
The return data of a config change.
|
class |
LlapZookeeperRegistryImpl.DynamicServiceInstance
A dynamically changing instance in an Llap Service.
|
conf, doCheckAcls, encoder, hostname, UNIQUE_ID, UNIQUE_IDENTIFIER, USER_SCOPE_PATH_PREFIX, WORKER_GROUP, WORKER_PREFIX, workersPath, zooKeeperClient| Constructor and Description |
|---|
LlapZookeeperRegistryImpl(String instanceName,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
protected LlapServiceInstance |
createServiceInstance(org.apache.hadoop.registry.client.types.ServiceRecord srv) |
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId() |
LlapServiceInstanceSet |
getInstances(String component,
long clusterReadyTimeoutMs)
Client API to get the list of instances registered via the current registry key.
|
org.apache.hadoop.registry.client.types.Endpoint |
getMngEndpoint() |
org.apache.hadoop.registry.client.types.Endpoint |
getOutputFormatEndpoint() |
org.apache.hadoop.registry.client.types.Endpoint |
getRpcEndpoint() |
org.apache.hadoop.registry.client.types.Endpoint |
getServicesEndpoint() |
org.apache.hadoop.registry.client.types.Endpoint |
getShuffleEndpoint() |
protected String |
getZkPathUser(org.apache.hadoop.conf.Configuration conf) |
LlapZookeeperRegistryImpl.ConfigChangeLockResult |
lockForConfigChange(long windowStart,
long windowEnd)
Locks the Llap Cluster for configuration change for the given time window.
|
String |
register()
Register the current instance - the implementation takes care of the endpoints to register.
|
void |
stop()
Stop the service registry
|
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.
|
currentUser, ensureInstancesCache, ensurePersistentNodePath, getAllInternal, getByHostInternal, getInstanceByPath, getPersistentNodePath, getRegistrationZnodePath, getRootNamespace, getWorkerData, initializeWithoutRegisteringInternal, populateCache, registerServiceRecord, registerServiceRecord, registerStateChangeListener, sizeInternal, start, unregisterInternal, updateServiceRecordclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterStateChangeListener, startpublic LlapZookeeperRegistryImpl(String instanceName, org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.registry.client.types.Endpoint getRpcEndpoint()
public org.apache.hadoop.registry.client.types.Endpoint getShuffleEndpoint()
public org.apache.hadoop.registry.client.types.Endpoint getServicesEndpoint()
public org.apache.hadoop.registry.client.types.Endpoint getMngEndpoint()
public org.apache.hadoop.registry.client.types.Endpoint getOutputFormatEndpoint()
public String register() throws IOException
ServiceRegistryregister in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic void updateRegistration(Iterable<Map.Entry<String,String>> attributes) throws IOException
ServiceRegistryupdateRegistration in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic void unregister()
throws IOException
ServiceRegistryunregister in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic LlapServiceInstanceSet getInstances(String component, long clusterReadyTimeoutMs) throws IOException
ServiceRegistrygetInstances in interface ServiceRegistry<LlapServiceInstance>clusterReadyTimeoutMs - The time to wait for the cluster to be ready, if it's not
started yet. 0 means do not wait.IOExceptionpublic org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
throws IOException
getApplicationId in interface ServiceRegistry<LlapServiceInstance>IOExceptionpublic void stop()
ServiceRegistrystop in interface ServiceRegistry<LlapServiceInstance>stop in class ZkRegistryBase<LlapServiceInstance>protected LlapServiceInstance createServiceInstance(org.apache.hadoop.registry.client.types.ServiceRecord srv) throws IOException
createServiceInstance in class ZkRegistryBase<LlapServiceInstance>IOExceptionprotected String getZkPathUser(org.apache.hadoop.conf.Configuration conf)
getZkPathUser in class ZkRegistryBase<LlapServiceInstance>public LlapZookeeperRegistryImpl.ConfigChangeLockResult lockForConfigChange(long windowStart, long windowEnd)
windowStart - The beginning of the time window when no other configuration change is allowed.windowEnd - The end of the time window when no other configuration change is allowed.Copyright © 2024 The Apache Software Foundation. All rights reserved.