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

    https://github.com/apache/spark/pull/20519#discussion_r167028262
  
    --- Diff: 
core/src/main/scala/org/apache/spark/api/python/PythonWorkerFactory.scala ---
    @@ -180,18 +181,52 @@ private[spark] class PythonWorkerFactory(pythonExec: 
String, envVars: Map[String
             return
           }
     
    +      var serverSocket: ServerSocket = null
           try {
    +        // get a server socket so that the launched daemon can tell us its 
server port
    +        serverSocket = new ServerSocket(0, 0, 
InetAddress.getByAddress(Array(127, 0, 0, 1)))
    --- End diff --
    
    Oh, and this one can also be a `val` instantiated outside the try.


---

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

Reply via email to