Github user falaki commented on a diff in the pull request:
https://github.com/apache/spark/pull/15471#discussion_r85229665
--- Diff: core/src/main/scala/org/apache/spark/api/r/RBackend.scala ---
@@ -110,6 +115,11 @@ private[spark] object RBackend extends Logging {
val boundPort = sparkRBackend.init()
val serverSocket = new ServerSocket(0, 1,
InetAddress.getByName("localhost"))
val listenPort = serverSocket.getLocalPort()
+ // Connection timeout is set by socket client. To make it
configurable we will pass the
+ // timeout value to client inside the temp file
+ val conf = new SparkConf()
+ val backendConnectionTimeout = conf.getInt(
--- End diff --
This is for `spark-submit`. Basically the JVM starts before the R process.
As a result the only way for R process to get these configuration parameters
from the JVM. In this case, `RBackend` sets the environment variables based on
configs.
For the other mode where JVM is started after the R process, we are sending
this timeout value through the TCP connection.
At least that is my current understanding of how deploy modes work. In our
production environment we launch the R process from the JVM.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]