@VisibleForTesting
  void prepare(InputInitializerContext initializerContext) throws IOException, SerDeException {
    userPayloadProto =
        MRInputHelpers.parseMRInputPayload(initializerContext.getInputUserPayload());

    this.conf = TezUtils.createConfFromByteString(userPayloadProto.getConfigurationBytes());

    this.jobConf = new JobConf(conf);

    // Read all credentials into the credentials instance stored in JobConf.
    ShimLoader.getHadoopShims().getMergedCredentials(jobConf);

    this.work = Utilities.getMapWork(jobConf);

    this.splitLocationProvider =
        Utils.getSplitLocationProvider(conf, work.getCacheAffinity(), LOG);
    LOG.info("SplitLocationProvider: " + splitLocationProvider);
  }
This class is used to generate splits inside the AM on the cluster. It
optionally groups together splits based on available head room as well as
making sure that splits from different partitions are only grouped if they
are of the same schema, format and serde
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HiveSplitGenerator.java