@Override
    public List<AmbryReplica> getReplicaIdsForPartition(AmbryPartition partition) {
      Set<AmbryReplica> replicas = ambryPartitionToAmbryReplicas.get(partition);

      if (replicas == null) {
        // Returns an empty list if the partition does not exist
        logger.error("Partition {} has no replicas", partition.getId());
        return Collections.emptyList();
      }

      return new ArrayList<>(replicas);
    }
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