diff --git data/conf/hive-log4j2.xml data/conf/hive-log4j2.xml index 48a584f..860d756 100644 --- data/conf/hive-log4j2.xml +++ data/conf/hive-log4j2.xml @@ -72,6 +72,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git data/conf/llap/tez-site.xml data/conf/llap/tez-site.xml index e69de29..940f390 100644 --- data/conf/llap/tez-site.xml +++ data/conf/llap/tez-site.xml @@ -0,0 +1,6 @@ + + + tez.am.dag.scheduler.class + org.apache.tez.dag.app.dag.impl.DAGSchedulerNaturalOrderControlled + + diff --git data/conf/tez/tez-site.xml data/conf/tez/tez-site.xml index e69de29..940f390 100644 --- data/conf/tez/tez-site.xml +++ data/conf/tez/tez-site.xml @@ -0,0 +1,6 @@ + + + tez.am.dag.scheduler.class + org.apache.tez.dag.app.dag.impl.DAGSchedulerNaturalOrderControlled + + diff --git itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java index 4cab161..477a08d 100644 --- itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java +++ itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java @@ -81,6 +81,7 @@ import org.apache.hadoop.hive.ql.exec.Utilities; import org.apache.hadoop.hive.ql.exec.spark.session.SparkSession; import org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionManagerImpl; +import org.apache.hadoop.hive.ql.exec.tez.TezSessionState; import org.apache.hadoop.hive.ql.lockmgr.zookeeper.CuratorFrameworkSingleton; import org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager; import org.apache.hadoop.hive.ql.metadata.Hive; @@ -158,6 +159,7 @@ private final boolean miniMr = false; private String hadoopVer = null; private QTestSetup setup = null; + private TezSessionState tezSessionState = null; private SparkSession sparkSession = null; private boolean isSessionStateStarted = false; private static final String javaVersion = getJavaVersion(); @@ -428,10 +430,16 @@ public QTestUtil(String outDir, String logDir, MiniClusterType clusterType, String uriString = WindowsPathUtil.getHdfsUriString(fs.getUri().toString()); if (clusterType == MiniClusterType.tez) { + if (confDir != null && !confDir.isEmpty()) { + conf.addResource(new URL("file://" + new File(confDir).toURI().getPath() + + "/tez-site.xml")); + } mr = shims.getMiniTezCluster(conf, 4, uriString, false); } else if (clusterType == MiniClusterType.llap) { if (confDir != null && !confDir.isEmpty()) { conf.addResource(new URL("file://" + new File(confDir).toURI().getPath() + + "/tez-site.xml")); + conf.addResource(new URL("file://" + new File(confDir).toURI().getPath() + "/llap-daemon-site.xml")); } mr = shims.getMiniTezCluster(conf, 2, uriString, true); @@ -952,6 +960,10 @@ public String cliInit(String tname, boolean recreate) throws Exception { sparkSession = oldSs.getSparkSession(); ss.setSparkSession(sparkSession); oldSs.setSparkSession(null); + // Copy the tezSessionState from the old CliSessionState. + tezSessionState = oldSs.getTezSession(); + ss.setTezSession(tezSessionState); + oldSs.setTezSession(null); oldSs.close(); } @@ -1016,6 +1028,10 @@ private CliSessionState startSessionState() sparkSession = oldSs.getSparkSession(); ss.setSparkSession(sparkSession); oldSs.setSparkSession(null); + // Copy the tezSessionState from the old CliSessionState. + tezSessionState = oldSs.getTezSession(); + ss.setTezSession(tezSessionState); + oldSs.setTezSession(null); oldSs.close(); } if (oldSs != null && oldSs.out != null && oldSs.out != System.out) {