public class LlapZookeeperRegistryImpl extends Object implements ServiceRegistry
Constructor and Description |
---|
LlapZookeeperRegistryImpl(String instanceName,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId() |
ServiceInstanceSet |
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() |
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
|
void |
unregister()
Remove the current registration cleanly (implementation defined cleanup)
|
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
IOException
public void unregister() throws IOException
ServiceRegistry
unregister
in interface ServiceRegistry
IOException
public ServiceInstanceSet getInstances(String component, long clusterReadyTimeoutMs) throws IOException
ServiceRegistry
getInstances
in interface ServiceRegistry
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
IOException
public void registerStateChangeListener(ServiceInstanceStateChangeListener listener) throws IOException
ServiceRegistry
registerStateChangeListener
in interface ServiceRegistry
listener
- - state change listenerIOException
public void start() throws IOException
ServiceRegistry
start
in interface ServiceRegistry
IOException
public void stop() throws IOException
ServiceRegistry
stop
in interface ServiceRegistry
IOException
Copyright © 2021 The Apache Software Foundation. All rights reserved.