AngersZhuuuu commented on a change in pull request #33934: URL: https://github.com/apache/spark/pull/33934#discussion_r704925379
########## File path: core/src/main/scala/org/apache/spark/deploy/PythonRunner.scala ########## @@ -92,15 +92,19 @@ object PythonRunner { // see https://github.com/numpy/numpy/issues/10455 sparkConf.getOption("spark.driver.cores").foreach(env.put("OMP_NUM_THREADS", _)) } - builder.redirectErrorStream(true) // Ugly but needed for stdout and stderr to synchronize try { val process = builder.start() + val stderrBuffer = new CircularBuffer(2048) + new RedirectThread( + process.getErrorStream, + stderrBuffer, + "Thread-ScriptTransformation-STDERR-Consumer").start() new RedirectThread(process.getInputStream, System.out, "redirect output").start() Review comment: > Is there any easy way to get the stderr stream, and manually merge stderr and stdout to printout? I think we shouldn't remove this from stdout. How about current? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org