Ngone51 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_r408560803
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/ScriptTransformationExec.scala
##########
@@ -146,12 +148,26 @@ case class ScriptTransformationExec(
}
}
+ private def waitForTransformationProcessTermination(): Unit = {
+ val timeout =
SQLConf.get.getConf(SQLConf.TRANSFORMATION_EXIT_TIMEOUT)
+ try {
+ proc.waitFor(timeout, TimeUnit.SECONDS)
+ } catch {
+ case t: Throwable =>
+ log.warn(s"Transformation script process exits timeout in
${timeout} seconds", t)
Review comment:
```
* @param timeout the maximum time to wait
* @param unit the time unit of the {@code timeout} argument
* @return {@code true} if the subprocess has exited and {@code false} if
* the waiting time elapsed before the subprocess has exited.
* @throws InterruptedException if the current thread is interrupted
* while waiting.
* @throws NullPointerException if unit is null
```
It seems that timeout won't throw an exception but only return false?
----------------------------------------------------------------
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]