allisonwang-db commented on code in PR #45468:
URL: https://github.com/apache/spark/pull/45468#discussion_r1520588014
##########
core/src/main/scala/org/apache/spark/api/python/StreamingPythonRunner.scala:
##########
@@ -68,17 +68,11 @@ private[spark] class StreamingPythonRunner(
envVars.put("SPARK_BUFFER_SIZE", bufferSize.toString)
envVars.put("SPARK_CONNECT_LOCAL_URL", connectUrl)
- val prevConf = conf.get(PYTHON_USE_DAEMON)
- conf.set(PYTHON_USE_DAEMON, false)
Review Comment:
cc @WweiL
##########
core/src/main/scala/org/apache/spark/SparkEnv.scala:
##########
@@ -141,20 +141,22 @@ class SparkEnv (
pythonExec: String,
workerModule: String,
daemonModule: String,
- envVars: Map[String, String]): (PythonWorker, Option[Long]) = {
+ envVars: Map[String, String],
+ useDaemon: Boolean = conf.get(Python.PYTHON_USE_DAEMON)): (PythonWorker,
Option[Long]) = {
synchronized {
val key = PythonWorkersKey(pythonExec, workerModule, daemonModule,
envVars)
- pythonWorkers.getOrElseUpdate(key,
- new PythonWorkerFactory(pythonExec, workerModule, daemonModule,
envVars)).create()
+ pythonWorkers.getOrElseUpdate(key, new PythonWorkerFactory(
+ pythonExec, workerModule, daemonModule, envVars, useDaemon)).create()
}
}
private[spark] def createPythonWorker(
pythonExec: String,
workerModule: String,
- envVars: Map[String, String]): (PythonWorker, Option[Long]) = {
+ envVars: Map[String, String],
+ useDaemon: Boolean): (PythonWorker, Option[Long]) = {
Review Comment:
I removed the default value here and added another method for creating
Python workers without this param.
--
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]