Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22085#discussion_r211357983
  
    --- Diff: 
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala ---
    @@ -180,7 +190,61 @@ private[spark] abstract class BasePythonRunner[IN, 
OUT](
             dataOut.writeInt(partitionIndex)
             // Python version of driver
             PythonRDD.writeUTF(pythonVer, dataOut)
    +        // Init a ServerSocket to accept method calls from Python side.
    +        val isBarrier = context.isInstanceOf[BarrierTaskContext]
    +        if (isBarrier) {
    +          serverSocket = Some(new ServerSocket(0, 1, 
InetAddress.getByName("localhost")))
    --- End diff --
    
    minor: useful to add `/* port */` and `/* backlog */` 


---

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

Reply via email to