HyukjinKwon commented on a change in pull request #33263:
URL: https://github.com/apache/spark/pull/33263#discussion_r667613070
##########
File path:
core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala
##########
@@ -185,11 +185,11 @@ private[deploy] class ExecutorRunner(
// Redirect its stdout and stderr to files
val stdout = new File(executorDir, "stdout")
- stdoutAppender = FileAppender(process.getInputStream, stdout, conf)
+ stdoutAppender = FileAppender(process.getInputStream, stdout, conf, true)
val stderr = new File(executorDir, "stderr")
Files.write(header, stderr, StandardCharsets.UTF_8)
- stderrAppender = FileAppender(process.getErrorStream, stderr, conf)
+ stderrAppender = FileAppender(process.getErrorStream, stderr, conf, true)
Review comment:
what about we wait both threads to finish first by
`stderrAppender.awaitTermination()`, close the input streams, and call
`Process.waitFor`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]