public void abortWritersAndUpdaters(FileSystem fs, boolean abort, boolean delete) throws HiveException {
      for (int idx = 0; idx < outWriters.length; idx++) {
        if (outWriters[idx] != null) {
          try {
            LOG.debug("Aborted: closing: " + outWriters[idx].toString());
            outWriters[idx].close(abort);
            if (delete) {
              fs.delete(outPaths[idx], true);
            }
            updateProgress();
          } catch (IOException e) {
            throw new HiveException(e);
          }
        }
      }
      for (int idx = 0; idx < updaters.length; idx++) {
        if (updaters[idx] != null) {
          try {
            LOG.debug("Aborted: closing: " + updaters[idx].toString());
            updaters[idx].close(abort);
            if (delete) {
              fs.delete(outPaths[idx], true);
            }
            updateProgress();
          } catch (IOException e) {
            throw new HiveException(e);
          }
        }
      }
    }
For direct write to final path during ACID insert, we create the delta directories
later when we create the RecordUpdater using AcidOutputFormat.Options
ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java