HyukjinKwon commented on code in PR #50466: URL: https://github.com/apache/spark/pull/50466#discussion_r2027861684
########## core/src/main/scala/org/apache/spark/api/python/StreamingPythonRunner.scala: ########## @@ -78,14 +80,20 @@ private[spark] class StreamingPythonRunner( pythonWorker = Some(worker) pythonWorkerFactory = Some(workerFactory) - val socket = pythonWorker.get.channel.socket() - val stream = new BufferedOutputStream(socket.getOutputStream, bufferSize) - val dataIn = new DataInputStream(new BufferedInputStream(socket.getInputStream, bufferSize)) + val socketChannel = pythonWorker.get.channel + val stream = new BufferedOutputStream(Channels.newOutputStream(socketChannel), bufferSize) + val dataIn = new DataInputStream( + new BufferedInputStream(Channels.newInputStream(socketChannel), bufferSize)) val dataOut = new DataOutputStream(stream) - val originalTimeout = socket.getSoTimeout() - // Set timeout to 5 minute during initialization config transmission - socket.setSoTimeout(5 * 60 * 1000) Review Comment: UDS is bound to filesystems so makes less sense to set the timeout (and it's not supported in either Python or Java) -- 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