OmniaGM commented on code in PR #16116:
URL: https://github.com/apache/kafka/pull/16116#discussion_r1637876229


##########
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##########
@@ -0,0 +1,447 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.compress.GzipCompression;
+import org.apache.kafka.common.compress.Lz4Compression;
+import org.apache.kafka.common.compress.ZstdCompression;
+import org.apache.kafka.common.config.AbstractConfig;
+import org.apache.kafka.common.config.ConfigDef;
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslClientAuth;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.TopicConfig;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.record.LegacyRecord;
+import org.apache.kafka.common.record.Records;
+import org.apache.kafka.common.security.auth.SecurityProtocol;
+import org.apache.kafka.common.utils.Utils;
+import org.apache.kafka.coordinator.group.ConsumerGroupMigrationPolicy;
+import org.apache.kafka.coordinator.group.Group;
+import org.apache.kafka.coordinator.group.GroupCoordinatorConfig;
+import org.apache.kafka.coordinator.transaction.TransactionLogConfigs;
+import org.apache.kafka.coordinator.transaction.TransactionStateManagerConfigs;
+import org.apache.kafka.network.SocketServerConfigs;
+import org.apache.kafka.raft.QuorumConfig;
+import org.apache.kafka.security.PasswordEncoderConfigs;
+import org.apache.kafka.server.common.MetadataVersionValidator;
+import org.apache.kafka.server.log.remote.storage.RemoteLogManagerConfig;
+import org.apache.kafka.server.metrics.MetricConfigs;
+import org.apache.kafka.server.record.BrokerCompressionType;
+import org.apache.kafka.storage.internals.log.CleanerConfig;
+import org.apache.kafka.storage.internals.log.LogConfig;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.kafka.common.config.ConfigDef.Importance.HIGH;
+import static org.apache.kafka.common.config.ConfigDef.Importance.LOW;
+import static org.apache.kafka.common.config.ConfigDef.Importance.MEDIUM;
+import static org.apache.kafka.common.config.ConfigDef.Range.atLeast;
+import static org.apache.kafka.common.config.ConfigDef.Range.between;
+import static org.apache.kafka.common.config.ConfigDef.Type.BOOLEAN;
+import static org.apache.kafka.common.config.ConfigDef.Type.CLASS;
+import static org.apache.kafka.common.config.ConfigDef.Type.DOUBLE;
+import static org.apache.kafka.common.config.ConfigDef.Type.INT;
+import static org.apache.kafka.common.config.ConfigDef.Type.LIST;
+import static org.apache.kafka.common.config.ConfigDef.Type.LONG;
+import static org.apache.kafka.common.config.ConfigDef.Type.PASSWORD;
+import static org.apache.kafka.common.config.ConfigDef.Type.SHORT;
+import static org.apache.kafka.common.config.ConfigDef.Type.STRING;
+
+/**
+ * During moving {@link kafka.server.KafkaConfig} out of core we will have 2 
KafkaConfig.
+ * org.apache.kafka.server.config.KafkaConfig will be the future KafkaConfig 
so any new getters, or updates for `CONFIG_DEF` will be defined here.
+ * Any code depends on kafka.server.KafkaConfig will keep for using 
kafka.server.KafkaConfig for the time being until we move it out of core
+ * For more details check KAFKA-15853
+ */
+public abstract class KafkaConfig extends AbstractConfig {
+    @SuppressWarnings("deprecation")
+    public static final ConfigDef CONFIG_DEF =  new 
ConfigDef(RemoteLogManagerConfig.configDef())
+        /** ********* Zookeeper Configuration ***********/

Review Comment:
   done 



##########
server/src/main/java/org/apache/kafka/server/config/KafkaConfig.java:
##########
@@ -0,0 +1,447 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.server.config;
+
+import org.apache.kafka.common.compress.GzipCompression;
+import org.apache.kafka.common.compress.Lz4Compression;
+import org.apache.kafka.common.compress.ZstdCompression;
+import org.apache.kafka.common.config.AbstractConfig;
+import org.apache.kafka.common.config.ConfigDef;
+import org.apache.kafka.common.config.SaslConfigs;
+import org.apache.kafka.common.config.SecurityConfig;
+import org.apache.kafka.common.config.SslClientAuth;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.TopicConfig;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.record.LegacyRecord;
+import org.apache.kafka.common.record.Records;
+import org.apache.kafka.common.security.auth.SecurityProtocol;
+import org.apache.kafka.common.utils.Utils;
+import org.apache.kafka.coordinator.group.ConsumerGroupMigrationPolicy;
+import org.apache.kafka.coordinator.group.Group;
+import org.apache.kafka.coordinator.group.GroupCoordinatorConfig;
+import org.apache.kafka.coordinator.transaction.TransactionLogConfigs;
+import org.apache.kafka.coordinator.transaction.TransactionStateManagerConfigs;
+import org.apache.kafka.network.SocketServerConfigs;
+import org.apache.kafka.raft.QuorumConfig;
+import org.apache.kafka.security.PasswordEncoderConfigs;
+import org.apache.kafka.server.common.MetadataVersionValidator;
+import org.apache.kafka.server.log.remote.storage.RemoteLogManagerConfig;
+import org.apache.kafka.server.metrics.MetricConfigs;
+import org.apache.kafka.server.record.BrokerCompressionType;
+import org.apache.kafka.storage.internals.log.CleanerConfig;
+import org.apache.kafka.storage.internals.log.LogConfig;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.kafka.common.config.ConfigDef.Importance.HIGH;
+import static org.apache.kafka.common.config.ConfigDef.Importance.LOW;
+import static org.apache.kafka.common.config.ConfigDef.Importance.MEDIUM;
+import static org.apache.kafka.common.config.ConfigDef.Range.atLeast;
+import static org.apache.kafka.common.config.ConfigDef.Range.between;
+import static org.apache.kafka.common.config.ConfigDef.Type.BOOLEAN;
+import static org.apache.kafka.common.config.ConfigDef.Type.CLASS;
+import static org.apache.kafka.common.config.ConfigDef.Type.DOUBLE;
+import static org.apache.kafka.common.config.ConfigDef.Type.INT;
+import static org.apache.kafka.common.config.ConfigDef.Type.LIST;
+import static org.apache.kafka.common.config.ConfigDef.Type.LONG;
+import static org.apache.kafka.common.config.ConfigDef.Type.PASSWORD;
+import static org.apache.kafka.common.config.ConfigDef.Type.SHORT;
+import static org.apache.kafka.common.config.ConfigDef.Type.STRING;
+
+/**
+ * During moving {@link kafka.server.KafkaConfig} out of core we will have 2 
KafkaConfig.
+ * org.apache.kafka.server.config.KafkaConfig will be the future KafkaConfig 
so any new getters, or updates for `CONFIG_DEF` will be defined here.
+ * Any code depends on kafka.server.KafkaConfig will keep for using 
kafka.server.KafkaConfig for the time being until we move it out of core
+ * For more details check KAFKA-15853
+ */
+public abstract class KafkaConfig extends AbstractConfig {
+    @SuppressWarnings("deprecation")
+    public static final ConfigDef CONFIG_DEF =  new 
ConfigDef(RemoteLogManagerConfig.configDef())
+        /** ********* Zookeeper Configuration ***********/
+        .define(ZkConfigs.ZK_CONNECT_CONFIG, STRING, null, HIGH, 
ZkConfigs.ZK_CONNECT_DOC)
+        .define(ZkConfigs.ZK_SESSION_TIMEOUT_MS_CONFIG, INT, 
ZkConfigs.ZK_SESSION_TIMEOUT_MS, HIGH, ZkConfigs.ZK_SESSION_TIMEOUT_MS_DOC)
+        .define(ZkConfigs.ZK_CONNECTION_TIMEOUT_MS_CONFIG, INT, null, HIGH, 
ZkConfigs.ZK_CONNECTION_TIMEOUT_MS_DOC)
+        .define(ZkConfigs.ZK_ENABLE_SECURE_ACLS_CONFIG, BOOLEAN, 
ZkConfigs.ZK_ENABLE_SECURE_ACLS, HIGH, ZkConfigs.ZK_ENABLE_SECURE_ACLS_DOC)
+        .define(ZkConfigs.ZK_MAX_IN_FLIGHT_REQUESTS_CONFIG, INT, 
ZkConfigs.ZK_MAX_IN_FLIGHT_REQUESTS, atLeast(1), HIGH, 
ZkConfigs.ZK_MAX_IN_FLIGHT_REQUESTS_DOC)
+        .define(ZkConfigs.ZK_SSL_CLIENT_ENABLE_CONFIG, BOOLEAN, 
ZkConfigs.ZK_SSL_CLIENT_ENABLE, MEDIUM, ZkConfigs.ZK_SSL_CLIENT_ENABLE_DOC)
+        .define(ZkConfigs.ZK_CLIENT_CNXN_SOCKET_CONFIG, STRING, null, MEDIUM, 
ZkConfigs.ZK_CLIENT_CNXN_SOCKET_DOC)
+        .define(ZkConfigs.ZK_SSL_KEY_STORE_LOCATION_CONFIG, STRING, null, 
MEDIUM, ZkConfigs.ZK_SSL_KEY_STORE_LOCATION_DOC)
+        .define(ZkConfigs.ZK_SSL_KEY_STORE_PASSWORD_CONFIG, PASSWORD, null, 
MEDIUM, ZkConfigs.ZK_SSL_KEY_STORE_PASSWORD_DOC)
+        .define(ZkConfigs.ZK_SSL_KEY_STORE_TYPE_CONFIG, STRING, null, MEDIUM, 
ZkConfigs.ZK_SSL_KEY_STORE_TYPE_DOC)
+        .define(ZkConfigs.ZK_SSL_TRUST_STORE_LOCATION_CONFIG, STRING, null, 
MEDIUM, ZkConfigs.ZK_SSL_TRUST_STORE_LOCATION_DOC)
+        .define(ZkConfigs.ZK_SSL_TRUST_STORE_PASSWORD_CONFIG, PASSWORD, null, 
MEDIUM, ZkConfigs.ZK_SSL_TRUST_STORE_PASSWORD_DOC)
+        .define(ZkConfigs.ZK_SSL_TRUST_STORE_TYPE_CONFIG, STRING, null, 
MEDIUM, ZkConfigs.ZK_SSL_TRUST_STORE_TYPE_DOC)
+        .define(ZkConfigs.ZK_SSL_PROTOCOL_CONFIG, STRING, 
ZkConfigs.ZK_SSL_PROTOCOL, LOW, ZkConfigs.ZK_SSL_PROTOCOL_DOC)
+        .define(ZkConfigs.ZK_SSL_ENABLED_PROTOCOLS_CONFIG, LIST, null, LOW, 
ZkConfigs.ZK_SSL_ENABLED_PROTOCOLS_DOC)
+        .define(ZkConfigs.ZK_SSL_CIPHER_SUITES_CONFIG, LIST, null, LOW, 
ZkConfigs.ZK_SSL_CIPHER_SUITES_DOC)
+        .define(ZkConfigs.ZK_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, 
STRING, ZkConfigs.ZK_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM, LOW, 
ZkConfigs.ZK_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_DOC)
+        .define(ZkConfigs.ZK_SSL_CRL_ENABLE_CONFIG, BOOLEAN, 
ZkConfigs.ZK_SSL_CRL_ENABLE, LOW, ZkConfigs.ZK_SSL_CRL_ENABLE_DOC)
+        .define(ZkConfigs.ZK_SSL_OCSP_ENABLE_CONFIG, BOOLEAN, 
ZkConfigs.ZK_SSL_OCSP_ENABLE, LOW, ZkConfigs.ZK_SSL_OCSP_ENABLE_DOC)
+
+        /** ********* General Configuration ***********/
+        .define(ServerConfigs.BROKER_ID_GENERATION_ENABLE_CONFIG, BOOLEAN, 
ServerConfigs.BROKER_ID_GENERATION_ENABLE_DEFAULT, MEDIUM, 
ServerConfigs.BROKER_ID_GENERATION_ENABLE_DOC)
+        .define(ServerConfigs.RESERVED_BROKER_MAX_ID_CONFIG, INT, 
ServerConfigs.RESERVED_BROKER_MAX_ID_DEFAULT, atLeast(0), MEDIUM, 
ServerConfigs.RESERVED_BROKER_MAX_ID_DOC)
+        .define(ServerConfigs.BROKER_ID_CONFIG, INT, 
ServerConfigs.BROKER_ID_DEFAULT, HIGH, ServerConfigs.BROKER_ID_DOC)
+        .define(ServerConfigs.MESSAGE_MAX_BYTES_CONFIG, INT, 
LogConfig.DEFAULT_MAX_MESSAGE_BYTES, atLeast(0), HIGH, 
ServerConfigs.MESSAGE_MAX_BYTES_DOC)
+        .define(ServerConfigs.NUM_NETWORK_THREADS_CONFIG, INT, 
ServerConfigs.NUM_NETWORK_THREADS_DEFAULT, atLeast(1), HIGH, 
ServerConfigs.NUM_NETWORK_THREADS_DOC)
+        .define(ServerConfigs.NUM_IO_THREADS_CONFIG, INT, 
ServerConfigs.NUM_IO_THREADS_DEFAULT, atLeast(1), HIGH, 
ServerConfigs.NUM_IO_THREADS_DOC)
+        .define(ServerConfigs.NUM_REPLICA_ALTER_LOG_DIRS_THREADS_CONFIG, INT, 
null, HIGH, ServerConfigs.NUM_REPLICA_ALTER_LOG_DIRS_THREADS_DOC)
+        .define(ServerConfigs.BACKGROUND_THREADS_CONFIG, INT, 
ServerConfigs.BACKGROUND_THREADS_DEFAULT, atLeast(1), HIGH, 
ServerConfigs.BACKGROUND_THREADS_DOC)
+        .define(ServerConfigs.QUEUED_MAX_REQUESTS_CONFIG, INT, 
ServerConfigs.QUEUED_MAX_REQUESTS_DEFAULT, atLeast(1), HIGH, 
ServerConfigs.QUEUED_MAX_REQUESTS_DOC)
+        .define(ServerConfigs.QUEUED_MAX_BYTES_CONFIG, LONG, 
ServerConfigs.QUEUED_MAX_REQUEST_BYTES_DEFAULT, MEDIUM, 
ServerConfigs.QUEUED_MAX_REQUEST_BYTES_DOC)
+        .define(ServerConfigs.REQUEST_TIMEOUT_MS_CONFIG, INT, 
ServerConfigs.REQUEST_TIMEOUT_MS_DEFAULT, HIGH, 
ServerConfigs.REQUEST_TIMEOUT_MS_DOC)
+        .define(ServerConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MS_CONFIG, LONG, 
ServerConfigs.DEFAULT_SOCKET_CONNECTION_SETUP_TIMEOUT_MS, MEDIUM, 
ServerConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MS_DOC)
+        .define(ServerConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS_CONFIG, 
LONG, ServerConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS, MEDIUM, 
ServerConfigs.SOCKET_CONNECTION_SETUP_TIMEOUT_MAX_MS_DOC)
+
+        /** ********* KRaft mode configs. ***********/
+        .define(KRaftConfigs.METADATA_SNAPSHOT_MAX_NEW_RECORD_BYTES_CONFIG, 
LONG, KRaftConfigs.METADATA_SNAPSHOT_MAX_NEW_RECORD_BYTES, atLeast(1), HIGH, 
KRaftConfigs.METADATA_SNAPSHOT_MAX_NEW_RECORD_BYTES_DOC)
+        .define(KRaftConfigs.METADATA_SNAPSHOT_MAX_INTERVAL_MS_CONFIG, LONG, 
KRaftConfigs.METADATA_SNAPSHOT_MAX_INTERVAL_MS_DEFAULT, atLeast(0), HIGH, 
KRaftConfigs.METADATA_SNAPSHOT_MAX_INTERVAL_MS_DOC)
+        .define(KRaftConfigs.PROCESS_ROLES_CONFIG, LIST, 
Collections.emptyList(), ConfigDef.ValidList.in("broker", "controller"), HIGH, 
KRaftConfigs.PROCESS_ROLES_DOC)
+        .define(KRaftConfigs.NODE_ID_CONFIG, INT, KRaftConfigs.EMPTY_NODE_ID, 
null, HIGH, KRaftConfigs.NODE_ID_DOC)
+        .define(KRaftConfigs.INITIAL_BROKER_REGISTRATION_TIMEOUT_MS_CONFIG, 
INT, KRaftConfigs.INITIAL_BROKER_REGISTRATION_TIMEOUT_MS_DEFAULT, null, MEDIUM, 
KRaftConfigs.INITIAL_BROKER_REGISTRATION_TIMEOUT_MS_DOC)
+        .define(KRaftConfigs.BROKER_HEARTBEAT_INTERVAL_MS_CONFIG, INT, 
KRaftConfigs.BROKER_HEARTBEAT_INTERVAL_MS_DEFAULT, null, MEDIUM, 
KRaftConfigs.BROKER_HEARTBEAT_INTERVAL_MS_DOC)
+        .define(KRaftConfigs.BROKER_SESSION_TIMEOUT_MS_CONFIG, INT, 
KRaftConfigs.BROKER_SESSION_TIMEOUT_MS_DEFAULT, null, MEDIUM, 
KRaftConfigs.BROKER_SESSION_TIMEOUT_MS_DOC)
+        .define(KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG, STRING, null, 
null, HIGH, KRaftConfigs.CONTROLLER_LISTENER_NAMES_DOC)
+        .define(KRaftConfigs.SASL_MECHANISM_CONTROLLER_PROTOCOL_CONFIG, 
STRING, SaslConfigs.DEFAULT_SASL_MECHANISM, null, HIGH, 
KRaftConfigs.SASL_MECHANISM_CONTROLLER_PROTOCOL_DOC)
+        .define(KRaftConfigs.METADATA_LOG_DIR_CONFIG, STRING, null, null, 
HIGH, KRaftConfigs.METADATA_LOG_DIR_DOC)
+        .define(KRaftConfigs.METADATA_LOG_SEGMENT_BYTES_CONFIG, INT, 
LogConfig.DEFAULT_SEGMENT_BYTES, atLeast(Records.LOG_OVERHEAD), HIGH, 
KRaftConfigs.METADATA_LOG_SEGMENT_BYTES_DOC)
+        .defineInternal(KRaftConfigs.METADATA_LOG_SEGMENT_MIN_BYTES_CONFIG, 
INT, 8 * 1024 * 1024, atLeast(Records.LOG_OVERHEAD), HIGH, 
KRaftConfigs.METADATA_LOG_SEGMENT_MIN_BYTES_DOC)
+        .define(KRaftConfigs.METADATA_LOG_SEGMENT_MILLIS_CONFIG, LONG, 
LogConfig.DEFAULT_SEGMENT_MS, null, HIGH, 
KRaftConfigs.METADATA_LOG_SEGMENT_MILLIS_DOC)
+        .define(KRaftConfigs.METADATA_MAX_RETENTION_BYTES_CONFIG, LONG, 
KRaftConfigs.METADATA_MAX_RETENTION_BYTES_DEFAULT, null, HIGH, 
KRaftConfigs.METADATA_MAX_RETENTION_BYTES_DOC)
+        .define(KRaftConfigs.METADATA_MAX_RETENTION_MILLIS_CONFIG, LONG, 
LogConfig.DEFAULT_RETENTION_MS, null, HIGH, 
KRaftConfigs.METADATA_MAX_RETENTION_MILLIS_DOC)
+        .define(KRaftConfigs.METADATA_MAX_IDLE_INTERVAL_MS_CONFIG, INT, 
KRaftConfigs.METADATA_MAX_IDLE_INTERVAL_MS_DEFAULT, atLeast(0), LOW, 
KRaftConfigs.METADATA_MAX_IDLE_INTERVAL_MS_DOC)
+        .defineInternal(KRaftConfigs.SERVER_MAX_STARTUP_TIME_MS_CONFIG, LONG, 
KRaftConfigs.SERVER_MAX_STARTUP_TIME_MS_DEFAULT, atLeast(0), MEDIUM, 
KRaftConfigs.SERVER_MAX_STARTUP_TIME_MS_DOC)
+        .define(KRaftConfigs.MIGRATION_ENABLED_CONFIG, BOOLEAN, false, HIGH, 
KRaftConfigs.MIGRATION_ENABLED_DOC)
+        .define(KRaftConfigs.ELR_ENABLED_CONFIG, BOOLEAN, false, HIGH, 
KRaftConfigs.ELR_ENABLED_DOC)
+        .defineInternal(KRaftConfigs.MIGRATION_METADATA_MIN_BATCH_SIZE_CONFIG, 
INT, KRaftConfigs.MIGRATION_METADATA_MIN_BATCH_SIZE_DEFAULT, atLeast(1),
+                MEDIUM, KRaftConfigs.MIGRATION_METADATA_MIN_BATCH_SIZE_DOC)

Review Comment:
   removed the new lines 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to