@VisibleForTesting
    InputDataInformationEvent write(int count, MRSplitProto mrSplit) {
      InputDataInformationEvent diEvent;
      Path filePath = getSerializedFilePath(count);

      Runnable task = () -> {
        if (!anyTaskFailed.get()) {
          try {
            writeSplit(count, mrSplit, filePath);
          } catch (IOException e) {
            anyTaskFailed.set(true);
            throw new RuntimeException(e);
          }
        }
      };
      asyncTasks.add(CompletableFuture.runAsync(task, executor));
      return InputDataInformationEvent.createWithSerializedPath(count, filePath.toString());
    }
SplitSerializer is a helper class for taking care of serializing splits to the tez scratch dir
when a size criteria defined by "hive.tez.input.fs.serialization.threshold" is met.
It utilizes an ExecutorService for parallel writes to prevent a single split write operation
becoming the bottleneck (as write() is called from a loop currently).
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HiveSplitGenerator.java