squito commented on a change in pull request #24898: [SPARK-22340][PYTHON] Add
a mode to pin Python thread into JVM's
URL: https://github.com/apache/spark/pull/24898#discussion_r343298546
##########
File path: python/pyspark/tests/test_context.py
##########
@@ -214,6 +214,10 @@ def test_progress_api(self):
rdd = sc.parallelize(range(10)).map(lambda x: time.sleep(100))
def run():
+ # When thread is pinned, job group should be set for each
thread for now.
+ # Local properties seem not being inherited like Scala side
does.
+ if os.environ.get("PYSPARK_PIN_THREAD", "false").lower() ==
"true":
+ sc.setJobGroup('test_progress_api', '', True)
Review comment:
actually, this test probably isn't reliable outside of pinned mode, right?
the java side could arbitrarily decide to switch threads at any point.
anyway, just something to keep in mind if we notice flakiness in this test
in the future.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]