From 63d99171639e24e0dfdb17a712f33aefab4e1caf Mon Sep 17 00:00:00 2001 From: Ashutosh Chauhan Date: Wed, 14 Sep 2016 16:41:07 -0700 Subject: [PATCH] HIVE-14762 : Add logging while removing scratch space --- ql/src/java/org/apache/hadoop/hive/ql/Context.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 ceb257c..838d73e 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/Context.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/Context.java @@ -99,7 +99,7 @@ protected int tryCount = 0; private TokenRewriteStream tokenRewriteStream; - private String executionId; + private final String executionId; // List of Locks for this query protected List hiveLocks; @@ -127,7 +127,7 @@ private final String stagingDir; private Heartbeater heartbeater; - + private boolean skipTableMasking; public Context(Configuration conf) throws IOException { @@ -392,6 +392,7 @@ public void removeScratchDir() { try { Path p = entry.getValue(); FileSystem fs = p.getFileSystem(conf); + LOG.debug("Deleting scratch dir: {}", p); fs.delete(p, true); fs.cancelDeleteOnExit(p); } catch (Exception e) { @@ -533,6 +534,7 @@ public void clear() throws IOException { if (resDir != null) { try { FileSystem fs = resDir.getFileSystem(conf); + LOG.debug("Deleting result dir: {}", resDir); fs.delete(resDir, true); } catch (IOException e) { LOG.info("Context clear error: " + StringUtils.stringifyException(e)); @@ -542,6 +544,7 @@ public void clear() throws IOException { if (resFile != null) { try { FileSystem fs = resFile.getFileSystem(conf); + LOG.debug("Deleting result file: {}", resFile); fs.delete(resFile, false); } catch (IOException e) { LOG.info("Context clear error: " + StringUtils.stringifyException(e)); -- 1.7.12.4 (Apple Git-37)