ClusterControlManager build() {
            if (logContext == null) {
                logContext = new LogContext();
            }
            if (clusterId == null) {
                clusterId = Uuid.randomUuid().toString();
            }
            if (snapshotRegistry == null) {
                snapshotRegistry = new SnapshotRegistry(logContext);
            }
            if (replicaPlacer == null) {
                replicaPlacer = new StripedReplicaPlacer(new Random());
            }
            if (featureControl == null) {
                throw new RuntimeException("You must specify FeatureControlManager");
            }
            if (brokerUncleanShutdownHandler == null) {
                throw new RuntimeException("You must specify BrokerUncleanShutdownHandler");
            }
            return new ClusterControlManager(logContext,
                clusterId,
                time,
                snapshotRegistry,
                sessionTimeoutNs,
                replicaPlacer,
                featureControl,
                zkMigrationEnabled,
                brokerUncleanShutdownHandler,
                // AutoMQ inject start
                quorumVoters,
                kvControlManager
                // AutoMQ inject end
            );
        }
The ClusterControlManager manages all the hard state associated with the Kafka cluster.
Hard state is state which appears in the metadata log, such as broker registrations,
brokers being fenced or unfenced, and broker feature versions.
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java