ivanyu commented on code in PR #22432:
URL: https://github.com/apache/kafka/pull/22432#discussion_r3461099196
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/BuiltInPartitioner.java:
##########
@@ -53,6 +53,9 @@ public class BuiltInPartitioner {
*
* @param topic The topic
* @param stickyBatchSize How much to produce to partition before switch
+ * @param rackAware Whether the partitioner is rack-aware,
+ * i.e. prioritizes partitions whose leaders are in the
same rack as the producer
+ * @param rack The rack of the producer (needed for the rack-aware mode)
Review Comment:
I'm not sure if I should make the `if (rackAware && Utils.isBlank(rack))`
check explicit in this constructor. This condition is checked up the call stack
when this all is created by the Producer. But this is a public class with a
public constructor, so probably it should duplicate the check here. WDYT?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]