@Override
  protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException {
    super.serializeStateData(serializer);
    RemovePeerStateData.Builder builder = RemovePeerStateData.newBuilder();
    if (peerConfig != null) {
      builder.setPeerConfig(ReplicationPeerConfigUtil.convert(peerConfig));
    }
    builder.addAllOngoingAssignReplicationQueuesProcIds(ongoingAssignReplicationQueuesProcIds);
    serializer.serialize(builder.build());
  }
The procedure for removing a replication peer.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/RemovePeerProcedure.java