@Override
  public List<ReplicaId> getReplicaIds(DataNodeId dataNodeId) {
    List<ReplicaId> dynamicReplicaIds = new ArrayList<>();
    DataNodeId ambryDataNode = helixClusterManager.getDataNodeId(dataNodeId.getHostname(), dataNodeId.getPort());
    helixClusterManager.getReplicaIds(ambryDataNode).forEach(r -> dynamicReplicaIds.add(r));
    if (check) {
      List<ReplicaId> staticReplicaIds = staticClusterManager.getReplicaIds(dataNodeId);
      String staticStr = String.join(",", staticReplicaIds.stream().map(r -> r.toString()).sorted().collect(Collectors.toList()));
      String helixStr = String.join(",", dynamicReplicaIds.stream().map(r -> r.toString()).sorted().collect(Collectors.toList()));
      if (!staticStr.equals(helixStr)) {
        logger.debug("Static replicas does not match Helix replicas");
        helixClusterManagerMetrics.getReplicaIdsMismatchCount.inc();
      }
    }
    return dynamicReplicaIds;
  }
Get the list of {@link ReplicaId}s associated with the given {@link DataNodeId} in the underlying
{@link StaticClusterManager}.
Also get the associated list of {@link ReplicaId}s from the underlying {@link HelixClusterManager} and verify
equality, updating a metric if there is a mismatch.
@param dataNodeId the {@link DataNodeId} for which the replicas are to be listed.
@return the list of {@link ReplicaId}s as present in the underlying {@link StaticClusterManager} for the given
node.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/CompositeClusterManager.java