ControllerServer¶
ControllerServer represents the controller in process.roles.
Creating Instance¶
ControllerServer takes the following to be created:
-
KafkaConfigSchema -
BootstrapMetadata
ControllerServer is created alongside a KafkaRaftServer (for controller in process.roles).
Starting Up¶
startup(): Unit
startup changes status from SHUTDOWN to STARTING.
startup uses server.max.startup.time.ms for...FIXME
startup prints out the following INFO message to the logs:
Starting controller
startup requests the DynamicBrokerConfig (of the KafkaConfig) to initialize (with no KafkaZkClient as it runs in Zookeeper-less KRaft mode).
startup changes status from STARTING to STARTED.
startup registers new metrics (gauges) in the KafkaMetricsGroup.
| Metric Name | Description |
|---|---|
ClusterId | clusterId |
yammer-metrics-count | |
linux-disk-read-bytes | (only on Linux) |
linux-disk-write-bytes | (only on Linux) |
startup...FIXME
Note
There is a lot services being registered that seem not necessarily as important at this early stage of the KRaft exploration of mine 😉
startup requests the SharedServer to startForController.
startup...FIXME
startup builds the QuorumController.
startup...FIXME
In the end, startup requests the DynamicBrokerConfig
startup registers this ControllerServer for dynamic config changes (to the KafkaConfig).
startup is used when:
KafkaRaftServeris requested to startup
Logging¶
Enable ALL logging level for kafka.server.ControllerServer logger to see what happens inside.
Add the following line to config/log4j.properties:
log4j.logger.kafka.server.ControllerServer=ALL
Refer to Logging.