kowshik commented on a change in pull request #10733:
URL: https://github.com/apache/kafka/pull/10733#discussion_r651532102



##########
File path: core/src/main/scala/kafka/log/LogConfig.scala
##########
@@ -301,6 +350,16 @@ object LogConfig {
         FollowerReplicationThrottledReplicasDoc, 
FollowerReplicationThrottledReplicasProp)
       .define(MessageDownConversionEnableProp, BOOLEAN, 
Defaults.MessageDownConversionEnable, LOW,
         MessageDownConversionEnableDoc, 
KafkaConfig.LogMessageDownConversionEnableProp)
+
+    // RemoteLogStorageEnableProp, LocalLogRetentionMsProp, 
LocalLogRetentionBytesProp do not have server default
+    // config names.
+    logConfigDef
+      // This define method is not overridden in LogConfig as these configs do 
not have server defaults yet.
+      .define(RemoteLogStorageEnableProp, BOOLEAN, 
Defaults.RemoteLogStorageEnable, MEDIUM, RemoteLogStorageEnableDoc)

Review comment:
       Don't we want this to be defined in `KafkaConfig` too so that we can 
enable them at broker/cluster level?

##########
File path: 
storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfig.java
##########
@@ -0,0 +1,350 @@
+/*
+ * 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.log.remote.storage;
+
+import org.apache.kafka.common.config.AbstractConfig;
+import org.apache.kafka.common.config.ConfigDef;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+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.DOUBLE;
+import static org.apache.kafka.common.config.ConfigDef.Type.INT;
+import static org.apache.kafka.common.config.ConfigDef.Type.LONG;
+import static org.apache.kafka.common.config.ConfigDef.Type.STRING;
+
+public final class RemoteLogManagerConfig {

Review comment:
       Hmm, why do these properties need to be defined under a separate class?
   A number of other existing properties are just defined inline in 
`KafkaConfig`, and so could these. Example: 
https://github.com/apache/kafka/blob/ff3b2d67a1049c75b300547ca6ecf074b6a3ab28/core/src/main/scala/kafka/server/KafkaConfig.scala#L917-L935

##########
File path: core/src/main/scala/kafka/log/LogConfig.scala
##########
@@ -301,6 +350,16 @@ object LogConfig {
         FollowerReplicationThrottledReplicasDoc, 
FollowerReplicationThrottledReplicasProp)
       .define(MessageDownConversionEnableProp, BOOLEAN, 
Defaults.MessageDownConversionEnable, LOW,
         MessageDownConversionEnableDoc, 
KafkaConfig.LogMessageDownConversionEnableProp)
+
+    // RemoteLogStorageEnableProp, LocalLogRetentionMsProp, 
LocalLogRetentionBytesProp do not have server default
+    // config names.

Review comment:
       It seems useful to have the configurability to enable widely (ex: across 
the broker), while optionally allowing the user to only enable it at a topic 
level when needed.




-- 
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.

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


Reply via email to