KAFKA-18363: Remove ZooKeeper mentiosn in broker configs (#18346)

Reviewers: Mickael Maison <mickael.maison@gmail.com>, TengYao Chi <kitingiao@gmail.com>
This commit is contained in:
Ken Huang 2025-01-21 01:22:40 +08:00 committed by GitHub
parent f1ee0557f8
commit d0bca67b27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 16 deletions

View File

@ -54,9 +54,8 @@ public class QuotaConfig {
public static final String CLIENT_QUOTA_CALLBACK_CLASS_CONFIG = "client.quota.callback.class"; public static final String CLIENT_QUOTA_CALLBACK_CLASS_CONFIG = "client.quota.callback.class";
public static final String CLIENT_QUOTA_CALLBACK_CLASS_DOC = "The fully qualified name of a class that implements the ClientQuotaCallback interface, " + public static final String CLIENT_QUOTA_CALLBACK_CLASS_DOC = "The fully qualified name of a class that implements the ClientQuotaCallback interface, " +
"which is used to determine quota limits applied to client requests. By default, the &lt;user&gt; and &lt;client-id&gt; " + "which is used to determine quota limits applied to client requests. " +
"quotas that are stored in ZooKeeper are applied. For any given request, the most specific quota that matches the user principal " + "For any given request, the most specific quota that matches the user principal of the session and the client-id of the request is applied.";
"of the session and the client-id of the request is applied.";
public static final String LEADER_REPLICATION_THROTTLED_REPLICAS_CONFIG = "leader.replication.throttled.replicas"; public static final String LEADER_REPLICATION_THROTTLED_REPLICAS_CONFIG = "leader.replication.throttled.replicas";
public static final String LEADER_REPLICATION_THROTTLED_REPLICAS_DOC = "A list of replicas for which log replication should be throttled on " + public static final String LEADER_REPLICATION_THROTTLED_REPLICAS_DOC = "A list of replicas for which log replication should be throttled on " +

View File

@ -77,8 +77,8 @@ public class SocketServerConfigs {
public static final String ADVERTISED_LISTENERS_CONFIG = "advertised.listeners"; public static final String ADVERTISED_LISTENERS_CONFIG = "advertised.listeners";
public static final String ADVERTISED_LISTENERS_DOC = String.format("Specifies the listener addresses that the Kafka brokers will advertise to clients and other brokers." + public static final String ADVERTISED_LISTENERS_DOC = String.format("Specifies the listener addresses that the Kafka brokers will advertise to clients and other brokers." +
" The config is useful where the actual listener configuration <code>%s</code> does not represent the addresses that clients should" + " The config is useful where the actual listener configuration <code>%s</code> does not represent the addresses that clients should" +
" use to connect, such as in cloud environments. In environments using ZooKeeper, these addresses are published to ZooKeeper." + " use to connect, such as in cloud environments." +
" In Kraft mode, the address would be published to and managed by kraft controller, the brokers would pull these data from controller as needed." + " The addresses are published to and managed by the controller, the brokers pull these data from the controller as needed." +
" In IaaS environments, this may need to be different from the interface to which the broker binds." + " In IaaS environments, this may need to be different from the interface to which the broker binds." +
" If this is not set, the value for <code>%1$1s</code> will be used." + " If this is not set, the value for <code>%1$1s</code> will be used." +
" Unlike <code>%1$1s</code>, it is not valid to advertise the 0.0.0.0 meta-address.%n" + " Unlike <code>%1$1s</code>, it is not valid to advertise the 0.0.0.0 meta-address.%n" +

View File

@ -35,8 +35,7 @@ import static org.apache.kafka.common.config.ConfigDef.Type.STRING;
public class KRaftConfigs { public class KRaftConfigs {
/** KRaft mode configs */ /** KRaft mode configs */
public static final String PROCESS_ROLES_CONFIG = "process.roles"; public static final String PROCESS_ROLES_CONFIG = "process.roles";
public static final String PROCESS_ROLES_DOC = "The roles that this process plays: 'broker', 'controller', or 'broker,controller' if it is both. " + public static final String PROCESS_ROLES_DOC = "The roles that this process plays: 'broker', 'controller', or 'broker,controller' if it is both. ";
"This configuration is only applicable for clusters in KRaft (Kafka Raft) mode (instead of ZooKeeper). Leave this config undefined or empty for ZooKeeper clusters.";
public static final String INITIAL_BROKER_REGISTRATION_TIMEOUT_MS_CONFIG = "initial.broker.registration.timeout.ms"; public static final String INITIAL_BROKER_REGISTRATION_TIMEOUT_MS_CONFIG = "initial.broker.registration.timeout.ms";
public static final int INITIAL_BROKER_REGISTRATION_TIMEOUT_MS_DEFAULT = 60000; public static final int INITIAL_BROKER_REGISTRATION_TIMEOUT_MS_DEFAULT = 60000;
@ -44,11 +43,11 @@ public class KRaftConfigs {
public static final String BROKER_HEARTBEAT_INTERVAL_MS_CONFIG = "broker.heartbeat.interval.ms"; public static final String BROKER_HEARTBEAT_INTERVAL_MS_CONFIG = "broker.heartbeat.interval.ms";
public static final int BROKER_HEARTBEAT_INTERVAL_MS_DEFAULT = 2000; public static final int BROKER_HEARTBEAT_INTERVAL_MS_DEFAULT = 2000;
public static final String BROKER_HEARTBEAT_INTERVAL_MS_DOC = "The length of time in milliseconds between broker heartbeats. Used when running in KRaft mode."; public static final String BROKER_HEARTBEAT_INTERVAL_MS_DOC = "The length of time in milliseconds between broker heartbeats.";
public static final String BROKER_SESSION_TIMEOUT_MS_CONFIG = "broker.session.timeout.ms"; public static final String BROKER_SESSION_TIMEOUT_MS_CONFIG = "broker.session.timeout.ms";
public static final int BROKER_SESSION_TIMEOUT_MS_DEFAULT = 9000; public static final int BROKER_SESSION_TIMEOUT_MS_DEFAULT = 9000;
public static final String BROKER_SESSION_TIMEOUT_MS_DOC = "The length of time in milliseconds that a broker lease lasts if no heartbeats are made. Used when running in KRaft mode."; public static final String BROKER_SESSION_TIMEOUT_MS_DOC = "The length of time in milliseconds that a broker lease lasts if no heartbeats are made.";
public static final String NODE_ID_CONFIG = "node.id"; public static final String NODE_ID_CONFIG = "node.id";
@ -57,7 +56,7 @@ public class KRaftConfigs {
"This is required configuration when running in KRaft mode."; "This is required configuration when running in KRaft mode.";
public static final String METADATA_LOG_DIR_CONFIG = "metadata.log.dir"; public static final String METADATA_LOG_DIR_CONFIG = "metadata.log.dir";
public static final String METADATA_LOG_DIR_DOC = "This configuration determines where we put the metadata log for clusters in KRaft mode. " + public static final String METADATA_LOG_DIR_DOC = "This configuration determines where we put the metadata log. " +
"If it is not set, the metadata log is placed in the first log directory from log.dirs."; "If it is not set, the metadata log is placed in the first log directory from log.dirs.";
public static final String METADATA_SNAPSHOT_MAX_INTERVAL_MS_CONFIG = "metadata.log.max.snapshot.interval.ms"; public static final String METADATA_SNAPSHOT_MAX_INTERVAL_MS_CONFIG = "metadata.log.max.snapshot.interval.ms";
@ -78,8 +77,7 @@ public class KRaftConfigs {
public static final String CONTROLLER_LISTENER_NAMES_CONFIG = "controller.listener.names"; public static final String CONTROLLER_LISTENER_NAMES_CONFIG = "controller.listener.names";
public static final String CONTROLLER_LISTENER_NAMES_DOC = "A comma-separated list of the names of the listeners used by the controller. This is required " + public static final String CONTROLLER_LISTENER_NAMES_DOC = "A comma-separated list of the names of the listeners used by the controller. This is required " +
"if running in KRaft mode. When communicating with the controller quorum, the broker will always use the first listener in this list.\n " + "when communicating with the controller quorum, the broker will always use the first listener in this list.";
"Note: The ZooKeeper-based controller should not set this configuration.";
public static final String SASL_MECHANISM_CONTROLLER_PROTOCOL_CONFIG = "sasl.mechanism.controller.protocol"; public static final String SASL_MECHANISM_CONTROLLER_PROTOCOL_CONFIG = "sasl.mechanism.controller.protocol";
public static final String SASL_MECHANISM_CONTROLLER_PROTOCOL_DOC = "SASL mechanism used for communication with controllers. Default is GSSAPI."; public static final String SASL_MECHANISM_CONTROLLER_PROTOCOL_DOC = "SASL mechanism used for communication with controllers. Default is GSSAPI.";

View File

@ -46,9 +46,7 @@ public class ServerConfigs {
public static final String BROKER_ID_CONFIG = "broker.id"; public static final String BROKER_ID_CONFIG = "broker.id";
public static final int BROKER_ID_DEFAULT = -1; public static final int BROKER_ID_DEFAULT = -1;
public static final String BROKER_ID_DOC = "The broker id for this server. If unset, a unique broker id will be generated." + public static final String BROKER_ID_DOC = "The broker id for this server.";
"To avoid conflicts between ZooKeeper generated broker id's and user configured broker id's, generated broker ids " +
"start from " + RESERVED_BROKER_MAX_ID_CONFIG + " + 1.";
public static final String MESSAGE_MAX_BYTES_CONFIG = "message.max.bytes"; public static final String MESSAGE_MAX_BYTES_CONFIG = "message.max.bytes";
public static final String MESSAGE_MAX_BYTES_DOC = TopicConfig.MAX_MESSAGE_BYTES_DOC + public static final String MESSAGE_MAX_BYTES_DOC = TopicConfig.MAX_MESSAGE_BYTES_DOC +