From c32a49549df77993075065687276b8940aa6b6c9 Mon Sep 17 00:00:00 2001 From: Ken Huang Date: Wed, 27 Nov 2024 21:07:36 +0800 Subject: [PATCH] MINOR: Remove duplicate valid value in document (#17947) Reviewers: Chia-Ping Tsai --- .../java/org/apache/kafka/clients/CommonClientConfigs.java | 3 +-- .../java/org/apache/kafka/common/config/TopicConfig.java | 2 +- .../org/apache/kafka/server/config/ServerLogConfigs.java | 2 +- .../org/apache/kafka/server/config/ReplicationConfigs.java | 7 +++---- .../server/log/remote/storage/RemoteLogManagerConfig.java | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java b/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java index 9c615bfbcc5..de01396c8c7 100644 --- a/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java +++ b/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java @@ -130,8 +130,7 @@ public class CommonClientConfigs { public static final String METRICS_CONTEXT_PREFIX = "metrics.context."; public static final String SECURITY_PROTOCOL_CONFIG = "security.protocol"; - public static final String SECURITY_PROTOCOL_DOC = "Protocol used to communicate with brokers. Valid values are: " + - String.join(", ", SecurityProtocol.names()) + "."; + public static final String SECURITY_PROTOCOL_DOC = "Protocol used to communicate with brokers."; public static final String DEFAULT_SECURITY_PROTOCOL = "PLAINTEXT"; public static final String SOCKET_CONNECTION_SETUP_TIMEOUT_MS_CONFIG = "socket.connection.setup.timeout.ms"; diff --git a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java index 1437577ed00..fa9388f0ab6 100755 --- a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java +++ b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java @@ -220,7 +220,7 @@ public class TopicConfig { public static final String MESSAGE_TIMESTAMP_TYPE_CONFIG = "message.timestamp.type"; public static final String MESSAGE_TIMESTAMP_TYPE_DOC = "Define whether the timestamp in the message is " + - "message create time or log append time. The value should be either `CreateTime` or `LogAppendTime`"; + "message create time or log append time."; /** * @deprecated since 3.6, removal planned in 4.0. diff --git a/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java b/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java index c6e0810262c..36409458a64 100644 --- a/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java +++ b/server-common/src/main/java/org/apache/kafka/server/config/ServerLogConfigs.java @@ -70,7 +70,7 @@ public class ServerLogConfigs { public static final String LOG_CLEANUP_POLICY_CONFIG = ServerTopicConfigSynonyms.serverSynonym(TopicConfig.CLEANUP_POLICY_CONFIG); public static final String LOG_CLEANUP_POLICY_DEFAULT = TopicConfig.CLEANUP_POLICY_DELETE; - public static final String LOG_CLEANUP_POLICY_DOC = "The default cleanup policy for segments beyond the retention window. A comma separated list of valid policies. Valid policies are: \"delete\" and \"compact\""; + public static final String LOG_CLEANUP_POLICY_DOC = "The default cleanup policy for segments beyond the retention window. A comma separated list of valid policies."; public static final String LOG_INDEX_SIZE_MAX_BYTES_CONFIG = ServerTopicConfigSynonyms.serverSynonym(TopicConfig.SEGMENT_INDEX_BYTES_CONFIG); public static final int LOG_INDEX_SIZE_MAX_BYTES_DEFAULT = 10 * 1024 * 1024; diff --git a/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java b/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java index 26cf840b511..8f9d3372be0 100644 --- a/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java +++ b/server/src/main/java/org/apache/kafka/server/config/ReplicationConfigs.java @@ -131,15 +131,14 @@ public class ReplicationConfigs { public static final String INTER_BROKER_PROTOCOL_VERSION_DEFAULT = MetadataVersion.latestProduction().version(); public static final String INTER_BROKER_PROTOCOL_VERSION_DOC = "Specify which version of the inter-broker protocol will be used.\n" + "This is typically bumped after all brokers were upgraded to a new version.\n" + - " Example of some valid values are: 0.8.0, 0.8.1, 0.8.1.1, 0.8.2, 0.8.2.0, 0.8.2.1, 0.9.0.0, 0.9.0.1 Check MetadataVersion for the full list.\n" + + "Check MetadataVersion for the full list.\n" + "This configuration is only applicable in Zookeeper mode."; public static final String INTER_BROKER_SECURITY_PROTOCOL_CONFIG = "security.inter.broker.protocol"; public static final String INTER_BROKER_SECURITY_PROTOCOL_DEFAULT = SecurityProtocol.PLAINTEXT.toString(); public static final String INTER_BROKER_LISTENER_NAME_CONFIG = "inter.broker.listener.name"; - public static final String INTER_BROKER_SECURITY_PROTOCOL_DOC = "Security protocol used to communicate between brokers. Valid values are: " + - String.join(", ", SecurityProtocol.names()) + ". It is an error to set this and " + INTER_BROKER_LISTENER_NAME_CONFIG + - " properties at the same time."; + public static final String INTER_BROKER_SECURITY_PROTOCOL_DOC = "Security protocol used to communicate between brokers. " + + "It is an error to set this and " + INTER_BROKER_LISTENER_NAME_CONFIG + " properties at the same time."; public static final String INTER_BROKER_LISTENER_NAME_DOC = "Name of listener used for communication between brokers. If this is unset, the listener name is defined by " + INTER_BROKER_SECURITY_PROTOCOL_CONFIG + ". It is an error to set this and " + INTER_BROKER_SECURITY_PROTOCOL_CONFIG + " properties at the same time."; diff --git a/storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfig.java b/storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfig.java index 4f75130fcba..cc74be368eb 100644 --- a/storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfig.java +++ b/storage/src/main/java/org/apache/kafka/server/log/remote/storage/RemoteLogManagerConfig.java @@ -54,8 +54,8 @@ public final class RemoteLogManagerConfig { public static final String DEFAULT_REMOTE_LOG_METADATA_MANAGER_CONFIG_PREFIX = "rlmm.config."; public static final String REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP = "remote.log.storage.system.enable"; - public static final String REMOTE_LOG_STORAGE_SYSTEM_ENABLE_DOC = "Whether to enable tiered storage functionality in a broker or not. Valid values " + - "are `true` or `false` and the default value is false. When it is true broker starts all the services required for the tiered storage functionality."; + public static final String REMOTE_LOG_STORAGE_SYSTEM_ENABLE_DOC = "Whether to enable tiered storage functionality in a broker or not. " + + "When it is true broker starts all the services required for the tiered storage functionality."; public static final boolean DEFAULT_REMOTE_LOG_STORAGE_SYSTEM_ENABLE = false; public static final String REMOTE_STORAGE_MANAGER_CLASS_NAME_PROP = "remote.log.storage.manager.class.name";