protected synchronized void chooseSinks() {
    Collection<ServerName> slaveAddresses = fetchPeerAddresses();
    if (slaveAddresses.isEmpty()) {
      LOG.warn("No sinks available at peer. Will not be able to replicate");
      this.sinkServers = Collections.emptyList();
    } else {
      int numSinks = (int) Math.ceil(slaveAddresses.size() * ratio);
      ReservoirSample<ServerName> sample = new ReservoirSample<>(numSinks);
      sample.add(slaveAddresses.iterator());
      this.sinkServers = sample.getSamplingResult();
    }
    badReportCounts.clear();
  }
Get the list of all the region servers from the specified peer
@return list of region server addresses or an empty list if the slave is unavailable
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java