private List<DataNodeId> getPartitionDataNodesFromDc(PartitionId partitionId, String dcName) {
    return partitionId.getReplicaIds()
        .stream()
        .filter(r -> r.getDataNodeId().getDatacenterName().equals(dcName))
        .map(ReplicaId::getDataNodeId)
        .collect(Collectors.toList());
  }
Get data nodes that hold given partition in certain datacenter
@param partitionId the partition which the nodes should hold.
@param dcName the data center in which these nodes are.
@return a list of nodes that hold given partition.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/ClusterChangeHandlerTest.java