zhengruifeng commented on code in PR #54139:
URL: https://github.com/apache/spark/pull/54139#discussion_r2763726415


##########
python/pyspark/worker_util.py:
##########
@@ -25,6 +25,10 @@
 from typing import Any, IO, Optional
 import warnings
 
+assert (
+    os.environ.get("SPARK_PYTHON_RUNTIME", "?") == "PYTHON_WORKER"

Review Comment:
   @ueshin @HyukjinKwon @gaogaotiantian 
   does it make sense to introduce such a env to identify where the current 
python process is?
   available options might be:
   
   - python worker spawned from executors
   - python worker spawned from driver
   - pyspark driver (in classic mode)
   - pyspark client (in connect mode)



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