private void disableReplicationLogCleaner(MasterProcedureEnv env)
    throws ProcedureSuspendedException {
    if (!env.getMasterServices().getReplicationLogCleanerBarrier().disable()) {
      // it is not likely that we can reach here as we will schedule this procedure immediately
      // after master restarting, where ReplicationLogCleaner should have not started its first run
      // yet. But anyway, let's make the code more robust. And it is safe to wait a bit here since
      // there will be no data in the new replication queue storage before we execute this procedure
      // so ReplicationLogCleaner will quit immediately without doing anything.
      throw suspend(env.getMasterConfiguration(),
        backoff -> LOG.info(
          "Can not disable replication log cleaner, sleep {} secs and retry later",
          backoff / 1000));
    }
    resetRetry();
  }
A procedure for migrating replication queue data from zookeeper to hbase:replication table.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/MigrateReplicationQueueFromZkToTableProcedure.java