Skip to content

Commit 6fcb1af

Browse files
committed
Update ScriptTransformbase.scala
1 parent 0d9c437 commit 6fcb1af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/script/ScriptTransformbase.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.spark.sql.execution.script
1919

2020
import java.io.OutputStream
21+
import java.util.concurrent.TimeUnit
2122

2223
import scala.util.control.NonFatal
2324

@@ -27,7 +28,7 @@ import org.apache.spark.{SparkException, TaskContext}
2728
import org.apache.spark.internal.Logging
2829
import org.apache.spark.rdd.RDD
2930
import org.apache.spark.sql.catalyst.InternalRow
30-
import org.apache.spark.sql.catalyst.expressions.{Projection, UnsafeProjection}
31+
import org.apache.spark.sql.catalyst.expressions.UnsafeProjection
3132
import org.apache.spark.sql.execution.UnaryExecNode
3233
import org.apache.spark.sql.types.DataType
3334
import org.apache.spark.util.{CircularBuffer, SerializableConfiguration, Utils}
@@ -63,6 +64,7 @@ private[sql] trait ScriptTransformBase extends UnaryExecNode {
6364
}
6465

6566
if (!proc.isAlive) {
67+
proc.waitFor(3000, TimeUnit.MILLISECONDS)
6668
val exitCode = proc.exitValue()
6769
if (exitCode != 0) {
6870
logError(stderrBuffer.toString) // log the stderr circular buffer

0 commit comments

Comments
 (0)