diff --git hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java index 363541b..e868102 100644 --- hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java +++ hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java @@ -213,10 +213,11 @@ private ExecBean auxRun(String program, List args, Map e 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));