public static void prepareTableDiffFile(List<NotificationEvent> notificationEvents, Hive hiveDb,
                                          ReplLoadWork work, HiveConf conf) throws Exception {
    HashSet<String> modifiedTables = new HashSet<>();
    for (NotificationEvent event : notificationEvents) {
      String tableName = event.getTableName();
      if (tableName != null) {
        LOG.debug("Added table {} because of eventId {} and eventType {}", event.getTableName(), event.getEventId(),
            event.getEventType());
        modifiedTables.add(event.getTableName());
      }
    }
    Path dumpPath = new Path(work.dumpDirectory).getParent();
    FileSystem fs = dumpPath.getFileSystem(conf);
    Path diffFilePath = new Path(dumpPath, TABLE_DIFF_INPROGRESS_DIRECTORY);
    fs.mkdirs(diffFilePath);
    for (String table : modifiedTables) {
      String tables = "";
      LOG.info("Added table {} to table diff", table);
      ArrayList<String> pathList = getListing(work.dbNameToLoadIn, table, hiveDb, conf);
      for (String path : pathList) {
        tables += path + System.lineSeparator();
      }
      Utils.writeOutput(tables, new Path(diffFilePath, table), conf);
    }
    LOG.info("Completed writing table diff progress file at {} with entries {}", dumpPath, modifiedTables);
    // The operation is complete, we can rename to TABLE_DIFF_COMPLETE
    fs.rename(diffFilePath, new Path(dumpPath, TABLE_DIFF_COMPLETE_DIRECTORY));
    LOG.info("Completed renaming table diff progress file to table diff complete file.");
  }
Prepares the table diff file, with tables modified post the specified event id.
@param notificationEvents Events that can possibly contain table DDL/DML metadata.
@param hiveDb the hive object
@param work the load work
@param conf hive configuration
@throws Exception
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/OptimisedBootstrapUtils.java