ueshin commented on code in PR #42341:
URL: https://github.com/apache/spark/pull/42341#discussion_r1284697366


##########
core/src/main/scala/org/apache/spark/api/python/StreamingPythonRunner.scala:
##########
@@ -100,7 +106,13 @@ private[spark] class StreamingPythonRunner(
    */
   def stop(): Unit = {
     pythonWorker.foreach { worker =>
-      SparkEnv.get.destroyPythonWorker(pythonExec, workerModule, 
envVars.asScala.toMap, worker)
+      val prevConf = conf.get(PYTHON_USE_DAEMON)
+      conf.set(PYTHON_USE_DAEMON, false)
+      try {
+        SparkEnv.get.destroyPythonWorker(pythonExec, workerModule, 
envVars.asScala.toMap, worker)
+      } finally {
+        conf.set(PYTHON_USE_DAEMON, prevConf)
+      }

Review Comment:
   I don't think this change is needed as `env.destroyPythonWorker` won't refer 
`conf`.



-- 
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]

Reply via email to