HyukjinKwon commented on a change in pull request #32399:
URL: https://github.com/apache/spark/pull/32399#discussion_r623525993
##########
File path: python/pyspark/util.py
##########
@@ -263,6 +264,46 @@ def _parse_memory(s):
return int(float(s[:-1]) * units[s[-1].lower()])
+def _on_inheritable_thread_start():
+ from pyspark import SparkContext
+ sc = SparkContext._active_spark_context
+ if isinstance(sc._gateway, ClientServer):
+ # Here's when the pinned-thread mode (PYSPARK_PIN_THREAD) is on.
+ properties = sc._jsc.sc().getLocalProperties().clone()
+ sc._jsc.sc().setLocalProperties(properties)
+
+
+def _on_inheritable_thread_stop():
Review comment:
Can we dedup the codes with `InheritableThread`?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]