Github user viirya commented on the issue:
https://github.com/apache/spark/pull/17282
This fixing is not in correct direction. The root cause is `coalesce` uses
wrong `jrdd_deserializer` when constructing new `RDD`.
The correct fixing looks like:
diff --git a/python/pyspark/rdd.py b/python/pyspark/rdd.py
index a5e6e2b..291c1ca 100644
--- a/python/pyspark/rdd.py
+++ b/python/pyspark/rdd.py
@@ -2072,10 +2072,12 @@ class RDD(object):
batchSize = min(10, self.ctx._batchSize or 1024)
ser = BatchedSerializer(PickleSerializer(), batchSize)
selfCopy = self._reserialize(ser)
+ jrdd_deserializer = selfCopy._jrdd_deserializer
jrdd = selfCopy._jrdd.coalesce(numPartitions, shuffle)
else:
+ jrdd_deserializer = self._jrdd_deserializer
jrdd = self._jrdd.coalesce(numPartitions, shuffle)
- return RDD(jrdd, self.ctx, self._jrdd_deserializer)
+ return RDD(jrdd, self.ctx, jrdd_deserializer)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]