Package org.apache.druid.client
Class BrokerViewOfBrokerConfig
java.lang.Object
org.apache.druid.client.BaseBrokerViewOfConfig<BrokerDynamicConfig>
org.apache.druid.client.BrokerViewOfBrokerConfig
- All Implemented Interfaces:
QueryConfigProvider
public class BrokerViewOfBrokerConfig
extends BaseBrokerViewOfConfig<BrokerDynamicConfig>
implements QueryConfigProvider
Broker view of broker dynamic configuration.
Also implements QueryConfigProvider to expose the effective default query context: the
merge of static defaults (from DefaultQueryConfig) and operator-supplied overrides
(from BrokerDynamicConfig.getQueryContext()). Dynamic values take precedence.
-
Constructor Summary
ConstructorsConstructorDescriptionBrokerViewOfBrokerConfig(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ServiceClientFactory clientFactory, ServiceLocator serviceLocator, DefaultQueryConfig defaultQueryConfig) BrokerViewOfBrokerConfig(CoordinatorClient coordinatorClient, DefaultQueryConfig defaultQueryConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected BrokerDynamicConfigFetch the configuration from the Coordinator via the HTTP client.protected StringE.g., "coordinator dynamic configuration", "broker dynamic configuration"Returns the pre-computed merge of staticDefaultQueryConfigcontext and dynamicBrokerDynamicConfig.getQueryContext().voidsetDynamicConfig(@NotNull BrokerDynamicConfig updatedConfig) Update the config view with a new broker dynamic config snapshot, and recompute the resolved default query context by merging static defaults with dynamic overrides.Methods inherited from class org.apache.druid.client.BaseBrokerViewOfConfig
getDynamicConfig, start
-
Constructor Details
-
BrokerViewOfBrokerConfig
@Inject public BrokerViewOfBrokerConfig(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ServiceClientFactory clientFactory, ServiceLocator serviceLocator, DefaultQueryConfig defaultQueryConfig) -
BrokerViewOfBrokerConfig
public BrokerViewOfBrokerConfig(CoordinatorClient coordinatorClient, DefaultQueryConfig defaultQueryConfig)
-
-
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<BrokerDynamicConfig>- 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<BrokerDynamicConfig>
-
setDynamicConfig
Update the config view with a new broker dynamic config snapshot, and recompute the resolved default query context by merging static defaults with dynamic overrides.- Overrides:
setDynamicConfigin classBaseBrokerViewOfConfig<BrokerDynamicConfig>- Parameters:
updatedConfig- the new configuration snapshot
-
getContext
Returns the pre-computed merge of staticDefaultQueryConfigcontext and dynamicBrokerDynamicConfig.getQueryContext(). Dynamic values take precedence over static defaults.- Specified by:
getContextin interfaceQueryConfigProvider
-