double getAvgLagFromDc(String dcName) {
    Set<RemoteReplicaInfo> replicaInfos = remoteReplicaInfosByDc.get(dcName);
    if (replicaInfos == null || replicaInfos.isEmpty()) {
      return -1.0;
    }
    LongSummaryStatistics longSummaryStatistics =
        replicaInfos.stream().collect(Collectors.summarizingLong(RemoteReplicaInfo::getRemoteLagFromLocalInBytes));
    dcToReplicaLagStats.put(dcName, longSummaryStatistics);
    return longSummaryStatistics.getAverage();
  }
Get tha average replication lag of remote replicas in given datacenter
@param dcName the name of dc where remote replicas sit
@return the average replication lag
ambry-replication/src/main/java/com/github/ambry/replication/ReplicationMetrics.java