Package org.apache.druid.client
Class BrokerViewOfCoordinatorConfig
java.lang.Object
org.apache.druid.client.BaseBrokerViewOfConfig<CoordinatorDynamicConfig>
org.apache.druid.client.BrokerViewOfCoordinatorConfig
- All Implemented Interfaces:
HistoricalFilter
public class BrokerViewOfCoordinatorConfig
extends BaseBrokerViewOfConfig<CoordinatorDynamicConfig>
implements 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 TypeMethodDescriptionprotected CoordinatorDynamicConfigFetch the configuration from the Coordinator via the HTTP client.protected StringE.g., "coordinator dynamic configuration", "broker dynamic configuration"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.Methods inherited from class org.apache.druid.client.BaseBrokerViewOfConfig
getDynamicConfig, start
-
Constructor Details
-
BrokerViewOfCoordinatorConfig
@Inject public BrokerViewOfCoordinatorConfig(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ServiceClientFactory clientFactory, ServiceLocator serviceLocator) -
BrokerViewOfCoordinatorConfig
-
-
Method Details
-
fetchConfigFromClient
Description copied from class:BaseBrokerViewOfConfigFetch the configuration from the Coordinator via the HTTP client. This is called once during broker startup.- Specified by:
fetchConfigFromClientin classBaseBrokerViewOfConfig<CoordinatorDynamicConfig>- Returns:
- the configuration fetched from the Coordinator
- Throws:
Exception- if the fetch fails
-
getConfigTypeName
Description copied from class:BaseBrokerViewOfConfigE.g., "coordinator dynamic configuration", "broker dynamic configuration"- Specified by:
getConfigTypeNamein classBaseBrokerViewOfConfig<CoordinatorDynamicConfig>
-
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.- Overrides:
setDynamicConfigin classBaseBrokerViewOfConfig<CoordinatorDynamicConfig>- Parameters:
updatedConfig- the new configuration snapshot
-
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
-