hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1602749 - in /hive/trunk: cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
Date Sun, 15 Jun 2014 18:32:48 GMT
Author: hashutosh
Date: Sun Jun 15 18:32:48 2014
New Revision: 1602749

URL: http://svn.apache.org/r1602749
Log:
HIVE-7228 : StreamPrinter should be joined to calling thread  (Pankit Thapar via Ashutosh
Chauhan)

Modified:
    hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java

Modified: hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
URL: http://svn.apache.org/viewvc/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java?rev=1602749&r1=1602748&r2=1602749&view=diff
==============================================================================
--- hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java (original)
+++ hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java Sun Jun 15 18:32:48
2014
@@ -148,6 +148,11 @@ public class CliDriver {
         errPrinter.start();
 
         ret = executor.waitFor();
+
+        // wait for stream threads to finish
+        outPrinter.join();
+        errPrinter.join();
+
         if (ret != 0) {
           console.printError("Command failed with exit code = " + ret);
         }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java?rev=1602749&r1=1602748&r2=1602749&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapRedTask.java Sun Jun 15 18:32:48
2014
@@ -276,6 +276,10 @@ public class MapRedTask extends ExecDriv
 
       int exitVal = jobExecHelper.progressLocal(executor, getId());
 
+      // wait for stream threads to finish
+      outPrinter.join();
+      errPrinter.join();
+
       if (exitVal != 0) {
         LOG.error("Execution failed with exit status: " + exitVal);
         if (SessionState.get() != null) {

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java?rev=1602749&r1=1602748&r2=1602749&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java Sun Jun
15 18:32:48 2014
@@ -264,6 +264,10 @@ public class MapredLocalTask extends Tas
 
       int exitVal = jobExecHelper.progressLocal(executor, getId());
 
+      // wait for stream threads to finish
+      outPrinter.join();
+      errPrinter.join();
+
       if (exitVal != 0) {
         LOG.error("Execution failed with exit status: " + exitVal);
         if (SessionState.get() != null) {



Mime
View raw message