You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by th...@apache.org on 2016/01/06 19:03:25 UTC
hive git commit: HIVE-12766 : TezTask does not close DagClient after
execution (Thejas Nair, reviewed by Vikram Dixit, Gunther Hagleitner)
Repository: hive
Updated Branches:
refs/heads/branch-2.0 23f67dac5 -> 410b0dd3d
HIVE-12766 : TezTask does not close DagClient after execution (Thejas Nair, reviewed by Vikram Dixit, Gunther Hagleitner)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/410b0dd3
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/410b0dd3
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/410b0dd3
Branch: refs/heads/branch-2.0
Commit: 410b0dd3d066f7fb2821d67873d038fa0caa5996
Parents: 23f67da
Author: Thejas Nair <th...@hortonworks.com>
Authored: Wed Jan 6 10:03:20 2016 -0800
Committer: Thejas Nair <th...@hortonworks.com>
Committed: Wed Jan 6 10:03:20 2016 -0800
----------------------------------------------------------------------
.../apache/hadoop/hive/ql/exec/tez/TezTask.java | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/410b0dd3/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java
index a2060da..88fba58 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java
@@ -236,7 +236,7 @@ public class TezTask extends Task<TezWork> {
ctx.clear();
} catch (Exception e) {
/*best effort*/
- LOG.warn("Failed to clean up after tez job");
+ LOG.warn("Failed to clean up after tez job", e);
}
}
// need to either move tmp files or remove them
@@ -498,9 +498,23 @@ public class TezTask extends Task<TezWork> {
console.printError(mesg, "\n" + StringUtils.stringifyException(e));
}
}
+ closeDagClientWithoutEx();
return rc;
}
+ /**
+ * Close DagClient, log warning if it throws any exception.
+ * We don't want to fail query if that function fails.
+ */
+ private void closeDagClientWithoutEx(){
+ try {
+ dagClient.close();
+ dagClient = null;
+ } catch (Exception e) {
+ LOG.warn("Failed to close DagClient", e);
+ }
+ }
+
@Override
public boolean isMapRedTask() {
return true;
@@ -564,8 +578,9 @@ public class TezTask extends Task<TezWork> {
LOG.info("Waiting for Tez task to shut down: " + this);
dagClient.waitForCompletion();
} catch (Exception ex) {
- LOG.info("Failed to shut down TezTask" + this, ex);
+ LOG.warn("Failed to shut down TezTask" + this, ex);
}
+ closeDagClientWithoutEx();
}
}