viirya commented on code in PR #60539:
URL: https://github.com/apache/spark/pull/60539#discussion_r4582909616
##########
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:
##########
@@ -605,6 +605,24 @@ private[spark] object BasePythonRunner extends Logging {
.getOrElse(message)
}
+ /**
+ * Converts the idle timeout of a Python worker, in seconds, to the value to
pass to
+ * `Socket.setSoTimeout`, which takes an `Int` of milliseconds and treats 0
as no timeout.
+ *
+ * A timeout that is zero or negative means no timeout and gives 0. A
positive timeout is
+ * converted without overflow, and one that exceeds `Int.MaxValue`
milliseconds (about 24.8
+ * days) is capped at `Int.MaxValue`, the longest read timeout a socket can
have, so that a
+ * positive timeout never turns into a negative value, a shorter timeout or
no timeout.
+ */
+ private[spark] def idleTimeoutToSoTimeoutMillis(idleTimeoutSeconds: Long):
Int = {
Review Comment:
Removed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]