Skip to content

Commit 75ea89a

Browse files
Boris Shminkesingularperturbation
authored andcommitted
[SPARK-18161][PYTHON] Update cloudpickle to v0.6.1
## What changes were proposed in this pull request? In this PR we've done two things: 1) updated the Spark's copy of cloudpickle to 0.6.1 (current stable) The main reason Spark stayed with cloudpickle 0.4.x was that the default pickle protocol was changed in later versions. 2) started using pickle.HIGHEST_PROTOCOL for both Python 2 and Python 3 for serializers and broadcast [Pyrolite](https://github.com/irmen/Pyrolite) has such Pickle protocol version support: reading: 0,1,2,3,4; writing: 2. ## How was this patch tested? Jenkins tests. Authors: Sloane Simmons, Boris Shminke This contribution is original work of Sloane Simmons and Boris Shminke and they licensed it to the project under the project's open source license. Closes #20691 from inpefess/pickle_protocol_4. Lead-authored-by: Boris Shminke <[email protected]> Co-authored-by: singularperturbation <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent a0faabf commit 75ea89a

File tree

4 files changed

+194
-78
lines changed

4 files changed

+194
-78
lines changed

python/pyspark/broadcast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from pyspark.cloudpickle import print_exec
2525
from pyspark.java_gateway import local_connect_and_auth
26-
from pyspark.serializers import ChunkedStream
26+
from pyspark.serializers import ChunkedStream, pickle_protocol
2727
from pyspark.util import _exception_message
2828

2929
if sys.version < '3':
@@ -109,7 +109,7 @@ def __init__(self, sc=None, value=None, pickle_registry=None, path=None,
109109

110110
def dump(self, value, f):
111111
try:
112-
pickle.dump(value, f, 2)
112+
pickle.dump(value, f, pickle_protocol)
113113
except pickle.PickleError:
114114
raise
115115
except Exception as e:

0 commit comments

Comments
 (0)