DynamicBrokerConfig¶
Initializing¶
initialize(
zkClientOpt: Option[KafkaZkClient]): Unit
initialize
creates a new KafkaConfig (based on the given current KafkaConfig).
With a KafkaZkClient
specified (KafkaServer):
initialize
creates a AdminZkClient-
initialize
uses theAdminZkClient
to fetchEntityConfig for allbrokers
and then updateDefaultConfig./bin/zkCli.sh -server localhost:2181 get /config/brokers
-
initialize
uses theAdminZkClient
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:
BrokerConfigHandler
is requested to processConfigChangesDynamicBrokerConfig
is requested to initialize
processReconfiguration¶
processReconfiguration(
newProps: Map[String, String],
validateOnly: Boolean,
doLog: Boolean = false): (KafkaConfig, List[BrokerReconfigurable])
processReconfiguration
...FIXME
processReconfiguration
is used when:
DynamicBrokerConfig
is requested to validate and updateCurrentConfig
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:
DynamicBrokerConfig
is requested to updateBrokerConfig and updateDefaultConfig
updateBrokerConfig¶
updateBrokerConfig(
brokerId: Int,
persistentProps: Properties,
doLog: Boolean = true): Unit
updateBrokerConfig
...FIXME
updateBrokerConfig
is used when:
BrokerConfigHandler
is requested to processConfigChangesDynamicBrokerConfig
is requested to initialize
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.