You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2021/09/20 17:54:19 UTC

[kafka] branch 3.0 updated: MINOR: defineInternal for KIP-405 configs (#11293)

This is an automated email from the ASF dual-hosted git repository.

junrao pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new cc036f6  MINOR: defineInternal for KIP-405 configs (#11293)
cc036f6 is described below

commit cc036f60b765225eab27bac6e4052e9ed37b4b57
Author: Cong Ding <co...@ccding.com>
AuthorDate: Mon Sep 20 10:49:03 2021 -0700

    MINOR: defineInternal for KIP-405 configs (#11293)
    
    We haven't finished implementing KIP-405, therefore we should make
    KIP-405 configs as defineInternal.
    
    Reviewers: Jun Rao <ju...@gmail.com>
---
 core/src/main/scala/kafka/log/LogConfig.scala         | 6 +++---
 core/src/main/scala/kafka/server/ZkAdminManager.scala | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/src/main/scala/kafka/log/LogConfig.scala b/core/src/main/scala/kafka/log/LogConfig.scala
index 4707b27..d983496 100755
--- a/core/src/main/scala/kafka/log/LogConfig.scala
+++ b/core/src/main/scala/kafka/log/LogConfig.scala
@@ -375,9 +375,9 @@ object LogConfig {
     // 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)
-      .define(LocalLogRetentionMsProp, LONG, Defaults.LocalRetentionMs, atLeast(-2), MEDIUM, LocalLogRetentionMsDoc)
-      .define(LocalLogRetentionBytesProp, LONG, Defaults.LocalRetentionBytes, atLeast(-2), MEDIUM, LocalLogRetentionBytesDoc)
+      .defineInternal(RemoteLogStorageEnableProp, BOOLEAN, Defaults.RemoteLogStorageEnable, null, MEDIUM, RemoteLogStorageEnableDoc)
+      .defineInternal(LocalLogRetentionMsProp, LONG, Defaults.LocalRetentionMs, atLeast(-2), MEDIUM, LocalLogRetentionMsDoc)
+      .defineInternal(LocalLogRetentionBytesProp, LONG, Defaults.LocalRetentionBytes, atLeast(-2), MEDIUM, LocalLogRetentionBytesDoc)
 
     logConfigDef
   }
diff --git a/core/src/main/scala/kafka/server/ZkAdminManager.scala b/core/src/main/scala/kafka/server/ZkAdminManager.scala
index cd26ac0..02d44cd 100644
--- a/core/src/main/scala/kafka/server/ZkAdminManager.scala
+++ b/core/src/main/scala/kafka/server/ZkAdminManager.scala
@@ -118,7 +118,7 @@ class ZkAdminManager(val config: KafkaConfig,
     metadataAndConfigs.get(topicName).foreach { result =>
       val logConfig = LogConfig.fromProps(LogConfig.extractLogConfigMap(config), configs)
       val createEntry = configHelper.createTopicConfigEntry(logConfig, configs, includeSynonyms = false, includeDocumentation = false)(_, _)
-      val topicConfigs = logConfig.values.asScala.map { case (k, v) =>
+      val topicConfigs = logConfig.nonInternalValues.asScala.map { case (k, v) =>
         val entry = createEntry(k, v)
         new CreatableTopicConfigs()
           .setName(k)