public static RegionInfo getRegionInfoForReplica(RegionInfo regionInfo, int replicaId) {
    if (regionInfo.getReplicaId() == replicaId) {
      return regionInfo;
    }
    return RegionInfoBuilder.newBuilder(regionInfo).setReplicaId(replicaId).build();
  }
Returns the RegionInfo for the given replicaId. RegionInfo's correspond to a range of a table,
but more than one "instance" of the same range can be deployed which are differentiated by the
replicaId.
@return an RegionInfo object corresponding to the same range (table, start and end key), but
        for the given replicaId.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionReplicaUtil.java