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, getAllInternal, getByHostInternal, getInstanceByPath, getRegistrationZnodePath, getRootNamespace, getWorkerData, initializeWithoutRegisteringInternal, populateCache, registerServiceRecord, registerServiceRecord, registerStateChangeListener, sizeInternal, start, unregisterInternal, updateServiceRecord
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerStateChangeListener, start
public 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
ServiceRegistry
register
in interface ServiceRegistry<LlapServiceInstance>
IOException
public void updateRegistration(Iterable<Map.Entry<String,String>> attributes) throws IOException
ServiceRegistry
updateRegistration
in interface ServiceRegistry<LlapServiceInstance>
IOException
public void unregister() throws IOException
ServiceRegistry
unregister
in interface ServiceRegistry<LlapServiceInstance>
IOException
public LlapServiceInstanceSet getInstances(String component, long clusterReadyTimeoutMs) throws IOException
ServiceRegistry
getInstances
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.IOException
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId() throws IOException
getApplicationId
in interface ServiceRegistry<LlapServiceInstance>
IOException
public void stop()
ServiceRegistry
stop
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>
IOException
protected 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 © 2022 The Apache Software Foundation. All rights reserved.