@Override
          public void run() throws SemanticException {
            try {
              Hive hiveDb = getHive();
              Database db = hiveDb.getDatabase(work.getTargetDatabase());
              HashMap<String, String> params = new HashMap<>(db.getParameters());
              LOG.debug("Database {} properties before removal {}", work.getTargetDatabase(), params);
              params.remove(REPL_RESUME_STARTED_AFTER_FAILOVER);
              params.remove(SOURCE_OF_REPLICATION);
              if (!work.shouldFailover()) {
                params.remove(REPL_FAILOVER_ENDPOINT);
              }

              LOG.info("Removed {} property from database {} after successful optimised bootstrap load.",
                  SOURCE_OF_REPLICATION, work.getTargetDatabase());

              int failbackCount = 1 + NumberUtils.toInt(params.getOrDefault(ReplConst.REPL_METRICS_FAILBACK_COUNT, "0"), 0);
              LOG.info("Replication Metrics: Setting replication metrics failback count for database: {} to: {} ", db.getName(), failbackCount);
              params.put(ReplConst.REPL_METRICS_FAILBACK_COUNT, Integer.toString(failbackCount));

              long failbackEndTime = System.currentTimeMillis();
              params.put(ReplConst.REPL_METRICS_LAST_FAILBACK_ENDTIME, Long.toString(failbackEndTime));
              LOG.info("Replication Metrics: Setting replication metrics failback end time for database: {} to: {} ", db.getName(), failbackEndTime);

              db.setParameters(params);
              hiveDb.alterDatabase(work.getTargetDatabase(), db);
              LOG.debug("Database {} properties after removal {}", work.getTargetDatabase(), params);
            } catch (HiveException e) {
              throw new SemanticException(e);
            }
          }
If replication policy is changed between previous and current load, then the excluded tables in
the new replication policy will be dropped.

@throws HiveException Failed to get/drop the tables.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java