public void addPeer(String peerId) throws IOException {
    boolean added = false;
    try {
      added = this.replicationPeers.addPeer(peerId);
    } catch (ReplicationException e) {
      throw new IOException(e);
    }
    if (added) {
      addSource(peerId, false);
    }
  }
<ol>
<li>Add peer to replicationPeers</li>
<li>Add the normal source and related replication queue</li>
<li>Add HFile Refs</li>
</ol>
@param peerId the id of replication peer
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java