Skip to content

Commit dc48ba9

Browse files
Sephiroth-Linsrowen
authored andcommitted
[SPARK-6604][PySpark]Specify ip of python server scoket
In driver now will start a server socket and use a wildcard ip, use 127.0.0.0 is more reasonable, as we only use it by local Python process. /cc davies Author: linweizhong <linweizhong@huawei.com> Closes #5256 from Sephiroth-Lin/SPARK-6604 and squashes the following commits: 7b3c633 [linweizhong] rephrase
1 parent f6a9a57 commit dc48ba9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ private[spark] object PythonRDD extends Logging {
604604
* The thread will terminate after all the data are sent or any exceptions happen.
605605
*/
606606
private def serveIterator[T](items: Iterator[T], threadName: String): Int = {
607-
val serverSocket = new ServerSocket(0, 1)
607+
val serverSocket = new ServerSocket(0, 1, InetAddress.getByName("localhost"))
608608
// Close the socket if no connection in 3 seconds
609609
serverSocket.setSoTimeout(3000)
610610

0 commit comments

Comments
 (0)