grundprinzip commented on code in PR #46125:
URL: https://github.com/apache/spark/pull/46125#discussion_r1576471728


##########
core/src/main/scala/org/apache/spark/api/python/StreamingPythonRunner.scala:
##########
@@ -91,6 +91,12 @@ private[spark] class StreamingPythonRunner(
       new 
BufferedInputStream(pythonWorker.get.channel.socket().getInputStream, 
bufferSize))
 
     val resFromPython = dataIn.readInt()
+    if (resFromPython != 0) {
+      val errMessage = PythonWorkerUtils.readUTF(dataIn)
+      throw new PythonException(s"Streaming Runner initialization failed" +
+        s" (returned $resFromPython). " +
+        s"Error message: $errMessage", null)
+    }

Review Comment:
   can you add a proper error class for this? Or does the Python exception 
already have one?



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

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to