@Override
    public List<String> getResourceNamesForPartition(AmbryPartition partition) {
      // Go through all datacenters since:
      //  1. A partition can reside in one datacenter only or
      //  2. A partition can belong to different resources in different data centers.
      Set<String> resourceNames = new HashSet<>();
      for (String dcName : partitionToResourceNameByDc.keySet()) {
        Set<String> resourceNamesInDC = partitionToResourceNameByDc.get(dcName).get(partition.toPathString());
        if (resourceNamesInDC != null && !resourceNamesInDC.isEmpty()) {
          resourceNames.addAll(resourceNamesInDC);
        }
      }
      return new ArrayList<>(resourceNames);
    }
Get all replica ids associated with the given {@link AmbryPartition}
@param partition the {@link AmbryPartition} for which to get the list of replicas.
@return the list of {@link AmbryReplica}s associated with the given partition.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixClusterManager.java