Repository: spark
Updated Branches:
  refs/heads/branch-1.2 cc7313d09 -> 602d5c1fc


SPARK-4704 [CORE] SparkSubmitDriverBootstrap doesn't flush output

Join on output threads to make sure any lingering output from process reaches 
stdout, stderr before exiting

CC andrewor14 since I believe he created this section of code

Author: Sean Owen <[email protected]>

Closes #4788 from srowen/SPARK-4704 and squashes the following commits:

ad7114e [Sean Owen] Join on output threads to make sure any lingering output 
from process reaches stdout, stderr before exiting

(cherry picked from commit cd5c8d7bbd3ea410df08af6cdd3833e0ed4b91a0)
Signed-off-by: Andrew Or <[email protected]>


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

Branch: refs/heads/branch-1.2
Commit: 602d5c1fc03ccb9bf7749f2c71f3a8d902455422
Parents: cc7313d
Author: Sean Owen <[email protected]>
Authored: Thu Feb 26 12:56:54 2015 -0800
Committer: Andrew Or <[email protected]>
Committed: Thu Feb 26 12:57:02 2015 -0800

----------------------------------------------------------------------
 .../org/apache/spark/deploy/SparkSubmitDriverBootstrapper.scala  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/602d5c1f/core/src/main/scala/org/apache/spark/deploy/SparkSubmitDriverBootstrapper.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/deploy/SparkSubmitDriverBootstrapper.scala
 
b/core/src/main/scala/org/apache/spark/deploy/SparkSubmitDriverBootstrapper.scala
index 2eab998..311048c 100644
--- 
a/core/src/main/scala/org/apache/spark/deploy/SparkSubmitDriverBootstrapper.scala
+++ 
b/core/src/main/scala/org/apache/spark/deploy/SparkSubmitDriverBootstrapper.scala
@@ -17,8 +17,6 @@
 
 package org.apache.spark.deploy
 
-import java.io.File
-
 import scala.collection.JavaConversions._
 
 import org.apache.spark.util.{RedirectThread, Utils}
@@ -164,6 +162,8 @@ private[spark] object SparkSubmitDriverBootstrapper {
       }
     }
     val returnCode = process.waitFor()
+    stdoutThread.join()
+    stderrThread.join()
     sys.exit(returnCode)
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to