Package org.apache.druid.client
Class BrokerViewOfCoordinatorConfig
java.lang.Object
org.apache.druid.client.BrokerViewOfCoordinatorConfig
- All Implemented Interfaces:
HistoricalFilter
Broker view of the coordinator dynamic configuration, and its derived values such as target and source clone servers.
This class is registered as a managed lifecycle to fetch the coordinator dynamic configuration on startup. Further
updates are handled through
BrokerDynamicConfigResource.-
Field Summary
Fields inherited from interface org.apache.druid.client.selector.HistoricalFilter
IDENTITY_FILTER -
Constructor Summary
ConstructorsConstructorDescriptionBrokerViewOfCoordinatorConfig(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ServiceClientFactory clientFactory, ServiceLocator serviceLocator) BrokerViewOfCoordinatorConfig(CoordinatorClient coordinatorClient) -
Method Summary
Modifier and TypeMethodDescriptionReturn the latestCoordinatorDynamicConfig.it.unimi.dsi.fastutil.ints.Int2ObjectRBTreeMap<Set<QueryableDruidServer>>getQueryableServers(it.unimi.dsi.fastutil.ints.Int2ObjectRBTreeMap<Set<QueryableDruidServer>> historicalServers, CloneQueryMode mode) Returns aInt2ObjectRBTreeMapafter performing a filtering on theQueryableDruidServer, based on the cloneQueryMode paramter.voidsetDynamicConfig(@NotNull CoordinatorDynamicConfig updatedConfig) Update the config view with a new coordinator dynamic config snapshot.voidstart()
-
Constructor Details
-
BrokerViewOfCoordinatorConfig
@Inject public BrokerViewOfCoordinatorConfig(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ServiceClientFactory clientFactory, ServiceLocator serviceLocator) -
BrokerViewOfCoordinatorConfig
-
-
Method Details
-
getDynamicConfig
Return the latestCoordinatorDynamicConfig. -
setDynamicConfig
Update the config view with a new coordinator dynamic config snapshot. Also updates the source and target clone servers based on the new dynamic configuration. -
start
public void start() -
getQueryableServers
public it.unimi.dsi.fastutil.ints.Int2ObjectRBTreeMap<Set<QueryableDruidServer>> getQueryableServers(it.unimi.dsi.fastutil.ints.Int2ObjectRBTreeMap<Set<QueryableDruidServer>> historicalServers, CloneQueryMode mode) Description copied from interface:HistoricalFilterReturns aInt2ObjectRBTreeMapafter performing a filtering on theQueryableDruidServer, based on the cloneQueryMode paramter. The map in the parameter is not modified.- Specified by:
getQueryableServersin interfaceHistoricalFilter
-