[ https://issues.apache.org/jira/browse/KAFKA-5513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
M. Manna reassigned KAFKA-5513: ------------------------------- Assignee: Tom Bentley Apologies, could this be peer reviewed and closed with a 2nd Op? > Contradicting scalaDoc for AdminUtils.assignReplicasToBrokers > ------------------------------------------------------------- > > Key: KAFKA-5513 > URL: https://issues.apache.org/jira/browse/KAFKA-5513 > Project: Kafka > Issue Type: Improvement > Components: core > Reporter: Charly Molter > Assignee: Tom Bentley > Priority: Trivial > > The documentation for AdminUtils.assignReplicasToBrokers seems to contradict > itself. > I says in the description: "As the result, if the number of replicas is equal > to or greater than the number of racks, it will ensure that each rack will > get at least one replica." > Which means that it is possible to get an assignment where there's multiple > replicas in a rack (if there's less racks than the replication factor). > However, the throws clauses says: " @throws AdminOperationException If rack > information is supplied but it is incomplete, or if it is not possible to > assign each replica to a unique rack." > Which seems to be contradicting the first claim. > In practice it doesn't throw when RF < #racks so the point in the @throws > clause should probably be removed. > https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/admin/AdminUtils.scala#L121-L130 -- This message was sent by Atlassian Jira (v8.3.4#803005)