DynamicBrokerConfig

DynamicBrokerConfig is created exclusively when KafkaConfig is created.

DynamicBrokerConfig is used to create a KafkaConfig.

Note
DynamicBrokerConfig is created when KafkaConfig is, but the reverse is also true (!) Isn’t it a dependency cycle? Not really since KafkaConfig will create a DynamicBrokerConfig unless one is provided.

DynamicBrokerConfig takes a single KafkaConfig when created.

Table 1. DynamicBrokerConfig’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

brokerReconfigurables

New reconfigurables registered in addBrokerReconfigurable

All removed in clear

currentConfig

Current KafkaConfig

Initialized with the input KafkaConfig.

Used when…​FIXME

dynamicDefaultConfigs

Dynamic configurations

Cleared and immediately updated in updateDefaultConfig

Cleared when DynamicBrokerConfig is requested to clear

Tip

Enable INFO, DEBUG or TRACE logging levels for kafka.server.DynamicBrokerConfig logger to see what happens inside.

Add the following line to config/log4j.properties:

log4j.logger.kafka.server.DynamicBrokerConfig=TRACE

Refer to Logging.

addBrokerReconfigurable Method

addBrokerReconfigurable(reconfigurable: BrokerReconfigurable): Unit

addBrokerReconfigurable…​FIXME

Note
addBrokerReconfigurable is used when…​FIXME

processReconfiguration Internal Method

processReconfiguration(
  newProps: Map[String, String],
  validateOnly: Boolean): (KafkaConfig, List[BrokerReconfigurable])

processReconfiguration…​FIXME

Note
processReconfiguration is used when DynamicBrokerConfig is requested to validate (with validateOnly flag enabled) and updateCurrentConfig (with validateOnly flag disabled).

updateCurrentConfig Internal Method

updateCurrentConfig(): Unit

updateCurrentConfig…​FIXME

Note
updateCurrentConfig is used when DynamicBrokerConfig is requested to updateBrokerConfig and updateDefaultConfig.

currentDynamicDefaultConfigs Method

currentDynamicDefaultConfigs: Map[String, String]

currentDynamicDefaultConfigs simply clones the dynamicDefaultConfigs.

Note
currentDynamicDefaultConfigs is used when AdminManager is requested to configSynonyms and describeConfigs.

Initializing (Fetching Broker Configuration From Zookeeper) — initialize Method

initialize(zkClient: KafkaZkClient): Unit

initialize creates a new KafkaConfig (with the properties of the initial KafkaConfig) that becomes the currentConfig.

initialize creates a AdminZkClient (with the input KafkaZkClient).

initialize requests the AdminZkClient to fetch the default configuration for brokers entities and updateDefaultConfig

initialize requests the AdminZkClient to fetch the configuration for the broker by the broker.id.

initialize maybeReEncodePasswords in the broker configuration and updateBrokerConfig with the broker.id.

Note
initialize is used exclusively when KafkaServer is requested to start up.

updateDefaultConfig Method

updateDefaultConfig(persistentProps: Properties): Unit

updateDefaultConfig…​FIXME

Note

updateDefaultConfig is used when:

updateBrokerConfig Method

updateBrokerConfig(brokerId: Int, persistentProps: Properties): Unit

updateBrokerConfig…​FIXME

Note

updateBrokerConfig is used when:

maybeReEncodePasswords Internal Method

maybeReEncodePasswords(persistentProps: Properties, adminZkClient: AdminZkClient): Properties

maybeReEncodePasswords…​FIXME

Note
maybeReEncodePasswords is used when…​FIXME

Registering (Adding) Reconfigurables For KafkaServer — addReconfigurables Method

addReconfigurables(kafkaServer: KafkaServer): Unit

addReconfigurables registers (adds) broker and regular reconfigurables.

Internally, addReconfigurables creates a DynamicThreadPool with the input KafkaServer and addBrokerReconfigurable.

addReconfigurables addBrokerReconfigurable with the LogCleaner (if configured).

addReconfigurables creates a DynamicThreadPool with the LogManager and the input KafkaServer, and addReconfigurable.

addReconfigurables creates a DynamicMetricsReporters for the broker and addReconfigurable.

addReconfigurables creates a DynamicClientQuotaCallback for the broker and addReconfigurable.

addReconfigurables creates a DynamicListenerConfig with the input KafkaServer and addBrokerReconfigurable.

Note
addReconfigurables is used exclusively when KafkaServer is requested to start up.

validate Method

validate(props: Properties, perBrokerConfig: Boolean): Unit

validate…​FIXME

Note
validate is used exclusively when AdminManager is requested to alterConfigs (when KafkaApis is requested to handleAlterConfigsRequest).

maybeReconfigure Method

maybeReconfigure(
  reconfigurable: Reconfigurable,
  oldConfig: KafkaConfig,
  newConfig: util.Map[String, _]): Unit

maybeReconfigure…​FIXME

Note

maybeReconfigure is used when:

processReconfigurable Method

processReconfigurable(
  reconfigurable: Reconfigurable,
  updatedConfigNames: Set[String],
  allNewConfigs: util.Map[String, _],
  newCustomConfigs: util.Map[String, Object],
  validateOnly: Boolean): Unit

processReconfigurable…​FIXME

Note
processReconfigurable is used when DynamicBrokerConfig is requested to processReconfiguration and processListenerReconfigurable.

processListenerReconfigurable Internal Method

processListenerReconfigurable(
  listenerReconfigurable: ListenerReconfigurable,
  newConfig: KafkaConfig,
  customConfigs: util.Map[String, Object],
  validateOnly: Boolean,
  reloadOnly:  Boolean): Unit

processListenerReconfigurable…​FIXME

Note
processListenerReconfigurable is used when DynamicBrokerConfig is requested to reloadUpdatedFilesWithoutConfigChange and processReconfiguration.

reloadUpdatedFilesWithoutConfigChange Internal Method

reloadUpdatedFilesWithoutConfigChange(newProps: Properties): Unit

reloadUpdatedFilesWithoutConfigChange…​FIXME

Note
reloadUpdatedFilesWithoutConfigChange is used exclusively when AdminManager is requested to alterConfigs (when KafkaApis is requested to handle a AlterConfigs request).

clear Method

clear(): Unit

clear…​FIXME

Note
clear is used exclusively when KafkaServer is requested to shut down.

validatedKafkaProps Method

validatedKafkaProps(
  propsOverride: Properties,
  perBrokerConfig: Boolean): Map[String, String]

validatedKafkaProps…​FIXME

Note
validatedKafkaProps is used when…​FIXME

results matching ""

    No results matching ""