Repository: hive
Updated Branches:
  refs/heads/master 805362474 -> b4b821e0a


HIVE-13552 : Templeton job does not write out log files on InterruptedException 
(Dennis Chan via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/b4b821e0
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/b4b821e0
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/b4b821e0

Branch: refs/heads/master
Commit: b4b821e0acdda7fe4729a5dd9f8655431c90109a
Parents: 8053624
Author: Dennis Chan <[email protected]>
Authored: Tue Apr 19 14:08:00 2016 -0800
Committer: Ashutosh Chauhan <[email protected]>
Committed: Sun May 1 18:13:10 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hive/hcatalog/templeton/ExecServiceImpl.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b4b821e0/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java
 
b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java
index 363541b..e868102 100644
--- 
a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java
+++ 
b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java
@@ -213,10 +213,11 @@ public class ExecServiceImpl implements ExecService {
         res.exitcode = proc.waitFor();
       } catch (InterruptedException e) {
         throw new IOException(e);
+      } finally {
+        //flush
+        errorGobbler.out.flush();
+        outputGobbler.out.flush();
       }
-      //flush
-      errorGobbler.out.flush();
-      outputGobbler.out.flush();
     }
     else {
       res.exitcode = executor.execute(cmd, execEnv(env));

Reply via email to