public void finishBackupExclusiveOperation() throws IOException {
    LOG.debug("Finish backup exclusive operation");

    try (Table table = connection.getTable(tableName)) {
      Put put = createPutForStopBackupSession();
      if (
        !table.checkAndMutate(ACTIVE_SESSION_ROW, SESSIONS_FAMILY).qualifier(ACTIVE_SESSION_COL)
          .ifEquals(ACTIVE_SESSION_YES).thenPut(put)
      ) {
        throw new IOException("There is no active backup exclusive operation");
      }
    }
  }
Exclusive operations are: create, delete, merge
@throws IOException if a table operation fails or an active backup exclusive operation is
                    already underway
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java