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_r408147540
 
 

 ##########
 File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala
 ##########
 @@ -146,12 +148,32 @@ case class ScriptTransformationExec(
           }
         }
 
+        private def waitForTransformationProcessTermination(): Unit = {
+          val timeout = 
SQLConf.get.getConf(SQLConf.TRANSFORMATION_EXIT_TIMEOUT)
+          try {
+            if (timeout < 0) {
+              proc.waitFor()
+            } else if (timeout == 0) {
+              // Do nothing
+            } else {
+              proc.waitFor(timeout, TimeUnit.SECONDS)
+            }
 
 Review comment:
   Sure,  updated.

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

Reply via email to