private AvailableSlotsCalculator getAvailableSlotsCalculator() throws Exception {
    Class<?> clazz = Class.forName(HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_SPLITS_AVAILABLE_SLOTS_CALCULATOR_CLASS),
            true, Utilities.getSessionSpecifiedClassLoader());
    AvailableSlotsCalculator slotsCalculator = (AvailableSlotsCalculator) ReflectionUtil.newInstance(clazz, null);
    slotsCalculator.initialize(conf, this);
    return slotsCalculator;
  }
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