Details
-
Improvement
-
Status: Open
-
Trivial
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.