jhu-chang commented on a change in pull request #33263:
URL: https://github.com/apache/spark/pull/33263#discussion_r670922261



##########
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:
       Would that make the invoking complicate? 
   On the other hand, if the constructor and "set bool variable" in two 
statements, there is still a chance that the inputStream would not been closed: 
the consume thread is started in construtor, if the thread exited immediately 
due some error, the inputStream may not close since the "set bool variable" may 
not called at that time. 




-- 
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]

Reply via email to