public static HiveConf getHiveOnTezConfFromDir(String confDir) throws Exception {
    HiveConf.setHiveSiteLocation(
        new URL("file://" + new File(confDir).toURI().getPath() + "/hive-site.xml"));
    HiveConf hiveConf = new HiveConf();
    hiveConf
        .addResource(new URL("file://" + new File(confDir).toURI().getPath() + "/tez-site.xml"));
    return hiveConf;
  }
Do the variable expansion by calling "set" on each variable.
When MR jobs are run, under some circumstances they fail because
the variable expansion fails after changes in Hadoop to prevent
variable expansion for JobHistoryServer. So expanding them ahead
so that variables like {test.tmp.dir} get expanded.
@param hiveConf
itests/hive-unit/src/test/java/org/apache/hadoop/hive/UtilsForTest.java