slamke commented on a change in pull request #27724: [SPARK-30973][SQL]
ScriptTransformationExec should wait for the termination …
URL: https://github.com/apache/spark/pull/27724#discussion_r407465261
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala
##########
@@ -161,6 +163,24 @@ case class ScriptTransformationExec(
if (scriptOutputReader != null) {
if (scriptOutputReader.next(scriptOutputWritable) <= 0) {
+ // There can be a lag between reader read EOF and the
process termination.
+ // If the script fails to startup, this kind of error may be
missed.
+ // So explicitly waiting for the process termination.
+ val timeout =
SQLConf.get.getConf(SQLConf.TRANSFORMATION_EXIT_TIMEOUT)
+ try {
+ if (timeout < 0) {
+ proc.waitFor()
Review comment:
doc is fixed and resubmitted.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]