You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/04/29 05:36:07 UTC

[GitHub] [kafka] kamalcph commented on a change in pull request #10589: MINOR: move topic configuration defaults

kamalcph commented on a change in pull request #10589:
URL: https://github.com/apache/kafka/pull/10589#discussion_r622745172



##########
File path: clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
##########
@@ -56,26 +66,30 @@
         "be overridden on a per-topic basis (see <a href=\"#topicconfigs\">the per-topic configuration section</a>).";
 
     public static final String FLUSH_MS_CONFIG = "flush.ms";
+    public static final long FLUSH_MS_DEFAULT = Long.MAX_VALUE;
     public static final String FLUSH_MS_DOC = "This setting allows specifying a time interval at which we will " +
         "force an fsync of data written to the log. For example if this was set to 1000 " +
         "we would fsync after 1000 ms had passed. In general we recommend you not set " +
         "this and use replication for durability and allow the operating system's background " +
         "flush capabilities as it is more efficient.";
 
     public static final String RETENTION_BYTES_CONFIG = "retention.bytes";
+    public static final long RETENTION_BYTES_DEFAULT = -1L;
     public static final String RETENTION_BYTES_DOC = "This configuration controls the maximum size a partition " +
         "(which consists of log segments) can grow to before we will discard old log segments to free up space if we " +
         "are using the \"delete\" retention policy. By default there is no size limit only a time limit. " +
         "Since this limit is enforced at the partition level, multiply it by the number of partitions to compute " +
         "the topic retention in bytes.";
 
     public static final String RETENTION_MS_CONFIG = "retention.ms";
+    public static final long RETENTION_MS_DEFAULT = TimeUnit.DAYS.toMillis(7);
     public static final String RETENTION_MS_DOC = "This configuration controls the maximum time we will retain a " +
         "log before we will discard old log segments to free up space if we are using the " +
         "\"delete\" retention policy. This represents an SLA on how soon consumers must read " +
         "their data. If set to -1, no time limit is applied.";
 
     public static final String MAX_MESSAGE_BYTES_CONFIG = "max.message.bytes";
+    public static final int MAX_MESSAGE_BYTES_DEFAULT = 1024 * 1024 + 12;

Review comment:
       Why not referring to Records.LOG_OVERHEAD instead of 12?

##########
File path: clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java
##########
@@ -166,19 +191,36 @@
         "they will receive messages with a format that they don't understand.";
 
     public static final String MESSAGE_TIMESTAMP_TYPE_CONFIG = "message.timestamp.type";
+    public static final String MESSAGE_TIMESTAMP_TYPE_DEFAULT = "CreateTime";
     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`";
 
     public static final String MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_CONFIG = "message.timestamp.difference.max.ms";
+    public static final long MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_DEFAULT = Long.MAX_VALUE;
     public static final String MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_DOC = "The maximum difference allowed between " +
         "the timestamp when a broker receives a message and the timestamp specified in the message. If " +
         "message.timestamp.type=CreateTime, a message will be rejected if the difference in timestamp " +
         "exceeds this threshold. This configuration is ignored if message.timestamp.type=LogAppendTime.";
 
     public static final String MESSAGE_DOWNCONVERSION_ENABLE_CONFIG = "message.downconversion.enable";
+    public static final boolean MESSAGE_DOWNCONVERSION_ENABLE_DEFAULT = true;
     public static final String MESSAGE_DOWNCONVERSION_ENABLE_DOC = "This configuration controls whether " +
         "down-conversion of message formats is enabled to satisfy consume requests. When set to <code>false</code>, " +
         "broker will not perform down-conversion for consumers expecting an older message format. The broker responds " +
         "with <code>UNSUPPORTED_VERSION</code> error for consume requests from such older clients. This configuration" +
         "does not apply to any message format conversion that might be required for replication to followers.";
+
+    public static final String LEADER_REPLICATION_THROTTLED_REPLICAS = "leader.replication.throttled.replicas";
+    public static final Collection<String> LEADER_REPLICATION_THROTTLED_REPLICAS_DEFAULT = Collections.emptyList();
+    public static final String LEADER_REPLICATION_THROTTLED_REPLICAS_DOC = "A list of replicas for which log " +
+        "replication should be throttled on the leader side. The list should describe a set of replicas in the form " +
+        "[PartitionId]:[BrokerId],[PartitionId]:[BrokerId]:... or alternatively the wildcard '*' can be used to throttle " +
+        "all replicas for this topic.";
+
+    public static final String FOLLOW_REPLICATION_THROTTLED_REPLICAS = "follower.replication.throttled.replicas";

Review comment:
       typo: FOLLOW_REPLICATION_THROTTLED_REPLICAS -> FOLLOWER_REPLICATION_THROTTLED_REPLICAS




-- 
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:
users@infra.apache.org