You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jg...@apache.org on 2022/06/08 00:54:29 UTC
[kafka] branch trunk updated: MINOR: Improve description of `cleanup.policy` (#12086)
This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new ae279a9d26 MINOR: Improve description of `cleanup.policy` (#12086)
ae279a9d26 is described below
commit ae279a9d26c4d736ec830ff5e90c527312b54df8
Author: nicolasguyomar <ni...@gmail.com>
AuthorDate: Wed Jun 8 02:54:20 2022 +0200
MINOR: Improve description of `cleanup.policy` (#12086)
Clarifies description of `cleanup.policy`, in particular for the case when both "delete" and "compact" are specified.
Reviewers: Divij Vaidya <di...@gmail.com>, Jason Gustafson <ja...@confluent.io>
---
.../java/org/apache/kafka/common/config/TopicConfig.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
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 dc80b7c139..5be3057b62 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
@@ -139,11 +139,13 @@ public class TopicConfig {
public static final String CLEANUP_POLICY_CONFIG = "cleanup.policy";
public static final String CLEANUP_POLICY_COMPACT = "compact";
public static final String CLEANUP_POLICY_DELETE = "delete";
- public static final String CLEANUP_POLICY_DOC = "A string that is either \"" + CLEANUP_POLICY_DELETE +
- "\" or \"" + CLEANUP_POLICY_COMPACT + "\" or both. This string designates the retention policy to use on " +
- "old log segments. The default policy (\"delete\") will discard old segments when their retention " +
- "time or size limit has been reached. The \"compact\" setting will enable <a href=\"#compaction\">log " +
- "compaction</a> on the topic.";
+ public static final String CLEANUP_POLICY_DOC = "This config designates the retention policy to " +
+ "use on log segments. The \"delete\" policy (which is the default) will discard old segments " +
+ "when their retention time or size limit has been reached. The \"compact\" policy will enable " +
+ "<a href=\"#compaction\">log compaction</a>, which retains the latest value for each key. " +
+ "It is also possible to specify both policies in a comma-separated list (e.g. \"delete,compact\"). " +
+ "In this case, old segments will be discarded per the retention time and size configuration, " +
+ "while retained segments will be compacted.";
public static final String UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG = "unclean.leader.election.enable";
public static final String UNCLEAN_LEADER_ELECTION_ENABLE_DOC = "Indicates whether to enable replicas " +