public RemoteReplicaInfo getRemoteReplicaInfo(PartitionId partitionId, String hostName, String replicaPath) {
    RemoteReplicaInfo foundRemoteReplicaInfo = null;

    PartitionInfo partitionInfo = partitionToPartitionInfo.get(partitionId);
    if (partitionInfo == null) {
      logger.debug("Remote replica info not present for partition {}, hostname {}, path {}", partitionId, hostName,
          replicaPath);
      return null;
    }
    for (RemoteReplicaInfo remoteReplicaInfo : partitionInfo.getRemoteReplicaInfos()) {
      if (remoteReplicaInfo.getReplicaId().getReplicaPath().equals(replicaPath) && remoteReplicaInfo.getReplicaId()
          .getDataNodeId()
          .getHostname()
          .equals(hostName)) {
        foundRemoteReplicaInfo = remoteReplicaInfo;
        break;
      }
    }
    if (foundRemoteReplicaInfo == null && !replicaPath.startsWith(Cloud_Replica_Keyword) && !replicaPath.startsWith(
        BackupCheckerThread.DR_Verifier_Keyword)) {
      replicationMetrics.unknownRemoteReplicaRequestCount.inc();
      logger.error("ReplicaMetaDataRequest from unknown Replica {}, with path {}", hostName, replicaPath);
    }
    return foundRemoteReplicaInfo;
  }
Gets the replica info for the remote peer replica identified by PartitionId, ReplicaPath and Hostname
@param partitionId PartitionId to which the replica belongs to
@param hostName hostname of the remote peer replica
@param replicaPath replica path on the remote peer replica
@return RemoteReplicaInfo
ambry-replication/src/main/java/com/github/ambry/replication/ReplicationEngine.java