private List<Disk> getDiskCandidatesForPartition(int replicaCountPerDatacenter, long replicaCapacityInBytes,
      Datacenter datacenter, boolean rackAware) {
    ArrayList<Disk> disksToAllocate = new ArrayList<Disk>();
    Set<DataNode> nodesToExclude = new HashSet<>();
    List<DataNode> dataNodes = new ArrayList<>(datacenter.getDataNodes());
    for (int i = 0; i < replicaCountPerDatacenter; i++) {
      Disk bestDisk = getBestDiskCandidate(dataNodes, nodesToExclude, replicaCapacityInBytes, rackAware, NUM_CHOICES);
      if (bestDisk != null) {
        disksToAllocate.add(bestDisk);
        nodesToExclude.add(bestDisk.getDataNode());
      } else {
        break;
      }
    }
    return disksToAllocate;
  }
Return a list of disks for a new partition in the specified {@link Datacenter}.  Does not retry if fewer than
{@code replicaCountPerDatacenter} disks cannot be allocated.

@param replicaCountPerDatacenter how many replicas to attempt to allocate in the datacenter
@param replicaCapacityInBytes the minimum amount of free space on a disk for a replica
@param datacenter the {@link Datacenter} to allocate replicas in
@param rackAware if {@code true}, attempt a rack-aware allocation
@return A list of {@link Disk}s
ambry-clustermap/src/main/java/com/github/ambry/clustermap/StaticClusterManager.java