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

    https://github.com/apache/spark/pull/20519#discussion_r167014593
  
    --- 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 --
    
    not sure it makes a difference here, but it's generally a good idea to call 
`setReuseAddress(true)`.


---

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

Reply via email to