private void setupTez(HiveConfForTest conf) {
    conf.setVar(HiveConf.ConfVars.HIVE_EXECUTION_ENGINE, "tez");
    conf.set("tez.am.resource.memory.mb", "128");
    conf.set("tez.am.dag.scheduler.class",
        "org.apache.tez.dag.app.dag.impl.DAGSchedulerNaturalOrderControlled");
    conf.set("fs.defaultFS", "file:///");
    conf.setBoolean("tez.runtime.optimize.local.fetch", true);
    conf.set("tez.staging-dir", conf.getTestDataDir());
    conf.setBoolean("tez.ignore.lib.uris", true);
    conf.set("hive.tez.container.size", "128");
    conf.setBoolean("hive.merge.tezfiles", false);
    if (!mmCompaction) {
      // We need these settings to create a table which is not bucketed, but contains multiple files.
      // If these parameters are set when inserting 100 rows into the table, the rows will
      // be distributed into multiple files. This setup is used in the testMinorCompactionWithoutBuckets,
      // testMinorCompactionWithoutBucketsInsertOverwrite and testMajorCompactionWithoutBucketsInsertAndDeleteInsertOverwrite
      // tests in the TestCrudCompactorOnTez class.
      // This use case has to be tested because of HIVE-23763. The MM compaction is not affected by this issue,
      // therefore no need to set these configs for MM compaction.
      conf.set("tez.grouping.max-size", "1024");
      conf.set("tez.grouping.min-size", "1");
    }
  }
Superclass for Test[Crud|Mm]CompactorOnTez, for setup and helper classes.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorOnTezTest.java