mimaison commented on code in PR #14734:
URL: https://github.com/apache/kafka/pull/14734#discussion_r1391134127


##########
metadata/src/main/java/org/apache/kafka/metadata/placement/StripedReplicaPlacer.java:
##########
@@ -33,89 +33,86 @@
 
 /**
  * The striped replica placer.
- *
- *
- * GOALS
- * The design of this placer attempts to satisfy a few competing goals.  
Firstly, we want
- * to spread the replicas as evenly as we can across racks.  In the simple 
case where
- * broker racks have not been configured, this goal is a no-op, of course.  
But it is the
+ * <p>
+ * <h3>Goals</h3>
+ * <p>The design of this placer attempts to satisfy a few competing goals. 
Firstly, we want
+ * to spread the replicas as evenly as we can across racks. In the simple case 
where
+ * broker racks have not been configured, this goal is a no-op, of course. But 
it is the
  * highest priority goal in multi-rack clusters.
  *
- * Our second goal is to spread the replicas evenly across brokers.  Since we 
are placing
+ * <p>Our second goal is to spread the replicas evenly across brokers. Since 
we are placing
  * multiple partitions, we try to avoid putting each partition on the same set 
of
- * replicas, even if it does satisfy the rack placement goal.  If any specific 
broker is
+ * replicas, even if it does satisfy the rack placement goal. If any specific 
broker is
  * fenced, we would like the new leaders to distributed evenly across the 
remaining
  * brokers.
  *
- * However, we treat the rack placement goal as higher priority than this 
goal-- if you
+ * <p>However, we treat the rack placement goal as higher priority than this 
goal-- if you
  * configure 10 brokers in rack A and B, and 1 broker in rack C, you will end 
up with a
  * lot of partitions on that one broker in rack C.  If you were to place a lot 
of
  * partitions with replication factor 3, each partition would try to get a 
replica there.
  * In general racks are supposed to be about the same size -- if they aren't, 
this is a
  * user error.
  *
- * Finally, we would prefer to place replicas on unfenced brokers, rather than 
on fenced
+ * <p>Finally, we would prefer to place replicas on unfenced brokers, rather 
than on fenced
  * brokers.
- *
- *
- * CONSTRAINTS
- * In addition to these goals, we have two constraints.  Unlike the goals, 
these are not
- * optional -- they are mandatory.  Placement will fail if a constraint cannot 
be
- * satisfied.  The first constraint is that we can't place more than one 
replica on the
- * same broker.  This imposes an upper limit on replication factor-- for 
example, a 3-node
- * cluster can't have any topics with replication factor 4.  This constraint 
comes from
+ * <p>

Review Comment:
   The render is a bit nicer with the extra spacing this introduces. We've used 
similar "tricks" for example in 
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java#L109



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to