siying commented on code in PR #49784: URL: https://github.com/apache/spark/pull/49784#discussion_r1940309868
########## core/src/main/scala/org/apache/spark/api/python/StreamingPythonRunner.scala: ########## @@ -76,47 +78,58 @@ private[spark] class StreamingPythonRunner( pythonWorker = Some(worker) pythonWorkerFactory = Some(workerFactory) - logInfo(log"[session: ${MDC(SESSION_ID, sessionId)}] Python worker created") - - val stream = new BufferedOutputStream( - pythonWorker.get.channel.socket().getOutputStream, bufferSize) + val socket = pythonWorker.get.channel.socket() + val stream = new BufferedOutputStream(socket.getOutputStream, bufferSize) + val dataIn = new DataInputStream(new BufferedInputStream(socket.getInputStream, bufferSize)) val dataOut = new DataOutputStream(stream) - logInfo(log"[session: ${MDC(SESSION_ID, sessionId)}] Sending necessary information to the " + - log"Python worker") + // Set timeout to 5 minute during initialization config transmission + socket.setSoTimeout(5 * 60 * 1000) Review Comment: Thank you for adding it. It is important to add a timeout here. -- 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