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 d1104b3..3e29d3c 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 @@ -430,6 +430,9 @@ public void shutdown() throws Exception { cleanUp(); } + if (clusterType == MiniClusterType.tez) { + SessionState.get().getTezSession().close(false); + } setup.tearDown(); if (sparkSession != null) { try { diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java index 89286e5..cef3303 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java @@ -249,13 +249,14 @@ public boolean hasResources(String[] localAmResources) { } /** - * Close a tez session. Will cleanup any tez/am related resources. After closing a session - * no further DAGs can be executed against it. - * @param keepTmpDir whether or not to remove the scratch dir at the same time. - * @throws IOException - * @throws TezException + * Close a tez session. Will cleanup any tez/am related resources. After closing a session no + * further DAGs can be executed against it. + * + * @param keepTmpDir + * whether or not to remove the scratch dir at the same time. + * @throws Exception */ - public void close(boolean keepTmpDir) throws TezException, IOException { + public void close(boolean keepTmpDir) throws Exception { if (!isOpen()) { return; }