Skip to content

DynamicBrokerConfig

Initializing

initialize(
  zkClientOpt: Option[KafkaZkClient]): Unit

initialize creates a new KafkaConfig (based on the given current KafkaConfig).

With a KafkaZkClient specified (KafkaServer):

  1. initialize creates a AdminZkClient
  2. initialize uses the AdminZkClient to fetchEntityConfig for all brokers and then updateDefaultConfig

    ./bin/zkCli.sh -server localhost:2181 get /config/brokers
    
  3. initialize uses the AdminZkClient to fetchEntityConfig for this broker (brokers entity with broker.id) and then updateBrokerConfig

    ./bin/zkCli.sh -server localhost:2181 get /config/brokers/[broker.id]
    

Note

KafkaZkClient is specified for KafkaServer (unlike BrokerServer that makes sense since BrokerServer is for Zookeeper-less Kafka deployment).


initialize is used when:

addReconfigurables

addReconfigurables(
  kafkaServer: KafkaBroker): Unit

addReconfigurables...FIXME


addReconfigurables is used when:

addBrokerReconfigurable

addBrokerReconfigurable(
  reconfigurable: BrokerReconfigurable): Unit

addBrokerReconfigurable...FIXME


addBrokerReconfigurable is used when:

  • FIXME

updateDefaultConfig

updateDefaultConfig(
  persistentProps: Properties,
  doLog: Boolean = true): Unit

updateDefaultConfig...FIXME


updateDefaultConfig is used when:

processReconfiguration

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

processReconfiguration...FIXME


processReconfiguration is used when:

validate

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

validate...FIXME


validate is used when:

  • FIXME

updateCurrentConfig

updateCurrentConfig(
  doLog: Boolean): Unit

updateCurrentConfig...FIXME


updateCurrentConfig is used when:

updateBrokerConfig

updateBrokerConfig(
  brokerId: Int,
  persistentProps: Properties,
  doLog: Boolean = true): Unit

updateBrokerConfig...FIXME


updateBrokerConfig is used when:

Logging

Enable ALL logging level 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.