Github user aarondav commented on a diff in the pull request: https://github.com/apache/spark/pull/603#discussion_r12387647 --- Diff: core/src/main/scala/org/apache/spark/api/python/PythonWorkerFactory.scala --- @@ -208,6 +170,19 @@ private[spark] class PythonWorkerFactory(pythonExec: String, envVars: Map[String } } + /** + * Redirect a worker's stdout and stderr to our stderr. + */ + private def redirectWorkerStreams(stdout: InputStream, stderr: InputStream) { + try { + new RedirectThread(stdout, System.err, "stdout reader for " + pythonExec).start() + new RedirectThread(stderr, System.err, "stderr reader for " + pythonExec).start() + } catch { + case e: Throwable => --- End diff -- Instantiating and starting a Thread generally never throw exceptions, but if you're really keen on doing so, catch Exception instead of Throwable and add the exception to the logWarning.
--- 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. ---