Class LocalClusterCoordinator
java.lang.Object
org.apache.drill.exec.coord.ClusterCoordinator
org.apache.drill.exec.coord.local.LocalClusterCoordinator
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.coord.ClusterCoordinator
ClusterCoordinator.RegistrationHandle
-
Field Summary
Fields inherited from class org.apache.drill.exec.coord.ClusterCoordinator
listeners
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Get a collection of available Drillbit endpoints, Thread-safe.Get a collection of ONLINE Drillbit endpoints by excluding the drillbits that are in QUIESCENT state (drillbits shutting down).<V> TransientStore<V>
getOrCreateTransientStore
(TransientStoreConfig<V> config) Returns astore
instance with the givenconfiguration
.getSemaphore
(String name, int maximumLeases) void
start
(long millis) Start the cluster coordinator.void
update
(ClusterCoordinator.RegistrationHandle handle, CoordinationProtos.DrillbitEndpoint.State state) Update drillbit endpoint state.Methods inherited from class org.apache.drill.exec.coord.ClusterCoordinator
addDrillbitStatusListener, drillbitRegistered, drillbitUnregistered, isDrillbitInState, removeDrillbitStatusListener
-
Constructor Details
-
LocalClusterCoordinator
public LocalClusterCoordinator()
-
-
Method Details
-
close
- Throws:
Exception
-
start
Description copied from class:ClusterCoordinator
Start the cluster coordinator. Millis to wait is- Specified by:
start
in classClusterCoordinator
- Parameters:
millis
- The maximum time to wait before throwing an exception if the cluster coordination service has not successfully started. Use 0 to wait indefinitely.- Throws:
Exception
- in case when unable to start coordinator
-
register
- Specified by:
register
in classClusterCoordinator
-
unregister
- Specified by:
unregister
in classClusterCoordinator
-
update
public ClusterCoordinator.RegistrationHandle update(ClusterCoordinator.RegistrationHandle handle, CoordinationProtos.DrillbitEndpoint.State state) Update drillbit endpoint state. Drillbit advertises its state. State information is used during planning and initial client connection phases.- Specified by:
update
in classClusterCoordinator
-
getAvailableEndpoints
Description copied from class:ClusterCoordinator
Get a collection of available Drillbit endpoints, Thread-safe. Could be slightly out of date depending on refresh policy.- Specified by:
getAvailableEndpoints
in classClusterCoordinator
- Returns:
- A collection of available endpoints.
-
getOnlineEndPoints
Get a collection of ONLINE Drillbit endpoints by excluding the drillbits that are in QUIESCENT state (drillbits shutting down). Primarily used by the planner to plan queries only on ONLINE drillbits and used by the client during initial connection phase to connect to a drillbit (foreman)- Specified by:
getOnlineEndPoints
in classClusterCoordinator
- Returns:
- A collection of ONLINE endpoints
-
getSemaphore
- Specified by:
getSemaphore
in classClusterCoordinator
-
getOrCreateTransientStore
Description copied from class:ClusterCoordinator
Returns astore
instance with the givenconfiguration
. Note that implementor might cache the instance so new instance creation is not guaranteed.- Specified by:
getOrCreateTransientStore
in classClusterCoordinator
- Type Parameters:
V
- value type for this store- Parameters:
config
- store configuration
-