Charly Molter created KAFKA-5513: ------------------------------------ Summary: 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 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 (v6.4.14#64029)