HyukjinKwon commented on code in PR #50466:
URL: https://github.com/apache/spark/pull/50466#discussion_r2027859800


##########
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:
##########
@@ -401,33 +411,32 @@ private[spark] abstract class BasePythonRunner[IN, OUT](
             }
           }.start()
         }
-        val secret = if (isBarrier) {
-          authHelper.secret
-        } else {
-          ""
-        }
         if (isBarrier) {
           // Close ServerSocket on task completion.
-          serverSocket.foreach { server =>
+          serverSocketChannel.foreach { server =>
             context.addTaskCompletionListener[Unit](_ => server.close())
           }
-          val boundPort: Int = serverSocket.map(_.getLocalPort).getOrElse(0)
-          if (boundPort == -1) {
-            val message = "ServerSocket failed to bind to Java side."
-            logError(message)
-            throw new SparkException(message)
+          if (isUnixDomainSock) {
+            logDebug(s"Started ServerSocket on with Unix Domain Socket 
$sockPath.")
+            dataOut.writeBoolean(/* isBarrier = */true)
+            dataOut.writeInt(-1)
+            PythonWorkerUtils.writeUTF(sockPath.getPath, dataOut)

Review Comment:
   i can change this to `PythonRDD.writeUTF` to be consistent but they are 
calling the same thing anyway. I will change it before merging this in.



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