You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jx...@apache.org on 2015/11/13 01:12:16 UTC
hive git commit: HIVE-12268: Context leaks deleteOnExit paths (Jimmy,
reviewed by Szehon)
Repository: hive
Updated Branches:
refs/heads/branch-1 d68f21153 -> ee36f3f25
HIVE-12268: Context leaks deleteOnExit paths (Jimmy, reviewed by Szehon)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ee36f3f2
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ee36f3f2
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ee36f3f2
Branch: refs/heads/branch-1
Commit: ee36f3f250a1d1b42dd710682dcc63569ed59d2d
Parents: d68f211
Author: Jimmy Xiang <jx...@cloudera.com>
Authored: Mon Oct 26 16:24:48 2015 -0700
Committer: Jimmy Xiang <jx...@apache.org>
Committed: Thu Nov 12 16:09:55 2015 -0800
----------------------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/Context.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/ee36f3f2/ql/src/java/org/apache/hadoop/hive/ql/Context.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Context.java b/ql/src/java/org/apache/hadoop/hive/ql/Context.java
index ca0d487..1499a91 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Context.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Context.java
@@ -347,7 +347,9 @@ public class Context {
for (Map.Entry<String, Path> entry : fsScratchDirs.entrySet()) {
try {
Path p = entry.getValue();
- p.getFileSystem(conf).delete(p, true);
+ FileSystem fs = p.getFileSystem(conf);
+ fs.delete(p, true);
+ fs.cancelDeleteOnExit(p);
} catch (Exception e) {
LOG.warn("Error Removing Scratch: "
+ StringUtils.stringifyException(e));