GitHub user vanzin opened a pull request: https://github.com/apache/spark/pull/18696
[SPARK-21490][core] Make sure SparkLauncher redirects needed streams. The code was failing to account for some cases when setting up log redirection. For example, if a user redirected only stdout to a file, the launcher code would leave stderr without redirection, which could lead to child processes getting stuck because stderr wasn't being read. So detect cases where only one of the streams is redirected, and redirect the other stream to the log as appropriate. For the old "launch()" API, redirection of the unconfigured stream only happens if the user has explicitly requested for log redirection. Log redirection is on by default with "startApplication()". Most of the change is actually adding new unit tests to make sure the different cases work as expected. As part of that, I moved some tests that were in the core/ module to the launcher/ module instead, since they don't depend on spark-submit. You can merge this pull request into a Git repository by running: $ git pull https://github.com/vanzin/spark SPARK-21490 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18696.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #18696 ---- commit 7d3db5fa1d7b0b6d1a9e247d5d6a223e4ef774df Author: Marcelo Vanzin <van...@cloudera.com> Date: 2017-07-20T18:21:45Z [SPARK-21490][core] Make sure SparkLauncher redirects needed streams. The code was failing to account for some cases when setting up log redirection. For example, if a user redirected only stdout to a file, the launcher code would leave stderr without redirection, which could lead to child processes getting stuck because stderr wasn't being read. So detect cases where only one of the streams is redirected, and redirect the other stream to the log as appropriate. For the old "launch()" API, redirection of the unconfigured stream only happens if the user has explicitly requested for log redirection. Log redirection is on by default with "startApplication()". Most of the change is actually adding new unit tests to make sure the different cases work as expected. As part of that, I moved some test that were in the core/ module to the launcher/ module instead, since they don't depend on spark-submit. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org