You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/11 06:08:20 UTC
[GitHub] [spark] liaoaoyuan97 commented on a change in pull request #21164: [SPARK-24098][SQL] ScriptTransformationExec should wait process exiting before output iterator finish
liaoaoyuan97 commented on a change in pull request #21164:
URL: https://github.com/apache/spark/pull/21164#discussion_r486793639
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala
##########
@@ -137,13 +137,12 @@ case class ScriptTransformationExec(
throw writerThread.exception.get
}
- if (!proc.isAlive) {
- val exitCode = proc.exitValue()
- if (exitCode != 0) {
- logError(stderrBuffer.toString) // log the stderr circular buffer
- throw new SparkException(s"Subprocess exited with status $exitCode. " +
- s"Error: ${stderrBuffer.toString}", cause)
- }
+ proc.waitFor()
Review comment:
@viirya In the proposed PR, proc.waitFor() is called within function checkFailureAndPropagate. Basically, proc is terminated before any checkFailureAndPropagate call returns. Do you mean that we should not waitfor proc before other CheckFailureAndPropagate calls but the case you mentioned?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org