protected final void checkPeerModificationEnabled(MasterProcedureEnv env) throws IOException {
    if (!env.getMasterServices().isReplicationPeerModificationEnabled()) {
      throw new IOException("Replication peer modification disabled");
    }
  }
The base class for all replication peer related procedure.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.java