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.

Tip

Enable ALL 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=ALL

Refer to Logging.

AllDynamicConfigs

AllDynamicConfigs are…​FIXME

Note

AllDynamicConfigs is used when:

DynamicPasswordConfigs

DynamicPasswordConfigs are…​FIXME

Note

DynamicPasswordConfigs is used when…​FIXME

addDynamicConfigs Internal Utility

addDynamicConfigs(
  configDef: ConfigDef): Unit

addDynamicConfigs…​FIXME

Note
addDynamicConfigs is used when…​FIXME

dynamicConfigUpdateModes Internal Utility

dynamicConfigUpdateModes: util.Map[String, String]

dynamicConfigUpdateModes…​FIXME

Note
dynamicConfigUpdateModes is used when…​FIXME

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

Registering Reconfigurable — addReconfigurable Method

addReconfigurable(
  reconfigurable: Reconfigurable): Unit

addReconfigurable verifyReconfigurableConfigs of the Reconfigurable.

In the end, addReconfigurable adds the Reconfigurable to the reconfigurables internal registry.

Note

addReconfigurable is used when:

verifyReconfigurableConfigs Internal Method

verifyReconfigurableConfigs(
  configNames: Set[String]): Unit

verifyReconfigurableConfigs…​FIXME

Note
verifyReconfigurableConfigs is used when…​FIXME

Internal Properties

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

reconfigurables

results matching ""

    No results matching ""