HyukjinKwon commented on a change in pull request #24705: [SPARK-22340][PYTHON]
Save localProperties in thread.local
URL: https://github.com/apache/spark/pull/24705#discussion_r287626804
##########
File path: python/pyspark/rdd.py
##########
@@ -869,7 +871,10 @@ def collect(self):
to be small, as all the data is loaded into the driver's memory.
"""
with SCCallSiteSync(self.context) as css:
- sock_info =
self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
+ java_map =
MapConverter().convert(self.context.getLocalProperties(),
+
self.context._gateway._gateway_client)
+ sock_info = self.ctx._jvm.PythonRDD.collectAndServe(
+ self._jrdd.rdd() ,java_map)
Review comment:
Would that work if we use UDF + count and use TaskContext's local property
access?
----------------------------------------------------------------
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]