Skip to content

Commit

Permalink
Doc fixes: Fix format and other small errors in config documentation (#…
Browse files Browse the repository at this point in the history
…13661)

Various formatting fixes in the config docs.

Reviewers: Bill Bejeck <bbejeck@apache.org>
  • Loading branch information
cherylws committed Jul 10, 2023
1 parent 8be601d commit e985087
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 63 deletions.
Expand Up @@ -281,22 +281,20 @@ public class ProducerConfig extends AbstractConfig {

/** <code>partitioner.class</code> */
public static final String PARTITIONER_CLASS_CONFIG = "partitioner.class";
private static final String PARTITIONER_CLASS_DOC = "A class to use to determine which partition to be send to when produce the records. Available options are:" +
"<ul>" +
"<li>If not set, the default partitioning logic is used. " +
"This strategy will try sticking to a partition until at least " + BATCH_SIZE_CONFIG + " bytes is produced to the partition. It works with the strategy:" +
"<ul>" +
"<li>If no partition is specified but a key is present, choose a partition based on a hash of the key</li>" +
"<li>If no partition or key is present, choose the sticky partition that changes when at least " + BATCH_SIZE_CONFIG + " bytes are produced to the partition.</li>" +
"</ul>" +
private static final String PARTITIONER_CLASS_DOC = "Determines which partition to send a record to when records are produced. Available options are:" +
"<ul>" +
"<li>If not set, the default partitioning logic is used. " +
"This strategy send records to a partition until at least " + BATCH_SIZE_CONFIG + " bytes is produced to the partition. It works with the strategy:" +
"<p> 1) If no partition is specified but a key is present, choose a partition based on a hash of the key." +
"<p> 2) If no partition or key is present, choose the sticky partition that changes when at least " + BATCH_SIZE_CONFIG + " bytes are produced to the partition." +
"</li>" +
"<li><code>org.apache.kafka.clients.producer.RoundRobinPartitioner</code>: This partitioning strategy is that " +
"each record in a series of consecutive records will be sent to a different partition(no matter if the 'key' is provided or not), " +
"until we run out of partitions and start over again. Note: There's a known issue that will cause uneven distribution when new batch is created. " +
"Please check KAFKA-9965 for more detail." +
"<li><code>org.apache.kafka.clients.producer.RoundRobinPartitioner</code>: A partitioning strategy where " +
"each record in a series of consecutive records is sent to a different partition, regardless of whether the 'key' is provided or not, " +
"until partitions run out and the process starts over again. Note: There's a known issue that will cause uneven distribution when a new batch is created. " +
"See KAFKA-9965 for more detail." +
"</li>" +
"</ul>" +
"<p>Implementing the <code>org.apache.kafka.clients.producer.Partitioner</code> interface allows you to plug in a custom partitioner.";
"</ul>" +
"<p>Implementing the <code>org.apache.kafka.clients.producer.Partitioner</code> interface allows you to plug in a custom partitioner.";

/** <code>interceptor.classes</code> */
public static final String INTERCEPTOR_CLASSES_CONFIG = "interceptor.classes";
Expand Down

0 comments on commit e985087

Please sign in to comment.