startup
DynamicConfigManager — Dynamic Configuration Management
DynamicConfigManager monitors (indirectly through the ZkNodeChangeNotificationListener) for any child node changes under /config/changes path in Zookeeper.
DynamicConfigManager uses the ZkNodeChangeNotificationListener (that in turn uses the NotificationHandler) to process configuration change notifications using ConfigHandlers.
DynamicConfigManager is created and immediately started up when KafkaServer is requested to start up.
When created, DynamicConfigManager is given the ConfigHandlers to use (directly from KafkaServer).
DynamicConfigManager uses the feature of Zookeeper called Sequence Nodes with config_change sequence number prefix.
|
Tip
|
Read up on Sequence Nodes in the official documentation of Apache Zookeeper. |
Creating DynamicConfigManager Instance
DynamicConfigManager takes the following to be created:
-
ConfigHandlers by name
|
Note
|
changeExpirationMs seems never used. |
DynamicConfigManager initializes the internal properties.
startup Method
startup…FIXME
|
Note
|
startup is used exclusively when KafkaServer is requested to start up.
|
ConfigChangedNotificationHandler Object
ConfigChangedNotificationHandler is a NotificationHandler that processNotification.
Processing Config Change Notifications — processNotification Method
processNotification(jsonBytes: Array[Byte]): Unit
|
Note
|
processNotification is part of the NotificationHandler Contract to handle a change notification.
|
processNotification…FIXME
Shutting Down — shutdown Method
shutdown(): Unit
shutdown simply requests the ZkNodeChangeNotificationListener to close.
|
Note
|
shutdown is used exclusively when KafkaServer is requested to shut down.
|
Internal Properties
| Name | Description |
|---|---|
|
AdminZkClient (for the KafkaZkClient) Used when:
|
|
ZkNodeChangeNotificationListener (for the KafkaZkClient and /config/changes path in Zookeeper, config_change sequence number prefix and the ConfigChangedNotificationHandler) Initialized when |