private boolean shouldReplayEvent(FileStatus dir, DumpType dumpType, String dbName) {
    // If database itself is null then we can not filter out anything.
    if (StringUtils.isBlank(dbName)) {
      return true;
    }

    try {
      Database database = Hive.get().getDatabase(dbName);
      return (database == null) || isEventNotReplayed(database.getParameters(), dir, dumpType);
    } catch (HiveException e) {
      // May be the db is getting created in this load
      log.debug("Failed to get the database " + dbName);
      return true;
    }
  }
IncrementalLoad
Iterate through the dump directory and create tasks to load the events.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/incremental/IncrementalLoadTasksBuilder.java