PartitionId getRandomFullyWritablePartition(String partitionClass, List<PartitionId> partitionsToExclude) {
      return getRandomPartitionWithState(partitionClass, partitionsToExclude,
          (partitionState -> partitionState == PartitionState.READ_WRITE), FULLY_WRITABLE_LOG_STR);
    }
Returns a fully writable partition selected at random, that belongs to the specified partition class and that is in
the state {@link PartitionState#READ_WRITE} AND has enough replicas up. In case none of the partitions have enough
replicas up, any fully writable partition is returned. Enough replicas is considered to be all local replicas if such
information is available. In case localDatacenterName is not available, all of the partition's replicas should be up.
@param partitionClass the class of the partitions desired. Can be {@code null}.
@param partitionsToExclude partitions that should be excluded from the result. Can be {@code null} or empty.
@return A fully writable partition or {@code null} if no fully writable partition with given criteria found
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapUtils.java