@Override
  protected void postPeerModification(MasterProcedureEnv env)
    throws IOException, ReplicationException {
    LOG.info("Successfully added {} peer {}, config {}", enabled ? "ENABLED" : "DISABLED", peerId,
      peerConfig);
    MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
    if (cpHost != null) {
      env.getMasterCoprocessorHost().postAddReplicationPeer(peerId, peerConfig);
    }
  }
The procedure for adding a new replication peer.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AddPeerProcedure.java