DynamicConfigManager — Dynamic Configuration Management

DynamicConfigManager monitors (indirectly through the ZkNodeChangeNotificationListener) for any child node changes under /config/changes path in Zookeeper.

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.
Table 1. DynamicConfigManager’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

adminZkClient

Used when:

configChangeListener

ZkNodeChangeNotificationListener (for the KafkaZkClient and /config/changes path in Zookeeper, config_change sequence number prefix and the ConfigChangedNotificationHandler)

Initialized when DynamicConfigManager is requested to start up

Closed when DynamicConfigManager is requested to shut down

startup Method

startup

startup…​FIXME

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

Creating DynamicConfigManager Instance

DynamicConfigManager takes the following when created:

Note
changeExpirationMs seems never used.

DynamicConfigManager initializes the internal registries and counters.

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

processEntityConfigChangeVersion1 Internal Method

processEntityConfigChangeVersion1(jsonBytes: Array[Byte], js: JsonObject): Unit

processEntityConfigChangeVersion1…​FIXME

Note
processEntityConfigChangeVersion1 is used when…​FIXME

processEntityConfigChangeVersion2 Internal Method

processEntityConfigChangeVersion2(jsonBytes: Array[Byte], js: JsonObject): Unit

processEntityConfigChangeVersion2…​FIXME

Note
processEntityConfigChangeVersion2 is used when…​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.

results matching ""

    No results matching ""