File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
core/src/main/scala/org/apache/spark/api/python Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ private[spark] class PythonRDD(
211211 for (bid <- bids) {
212212 if (! nbids.contains(bid)) {
213213 // remove the broadcast from worker
214- dataOut.writeLong(- bid)
214+ dataOut.writeLong(- bid - 1 ) // bid >= 0
215215 bids.remove(bid)
216216 }
217217 }
Original file line number Diff line number Diff line change @@ -69,11 +69,12 @@ def main(infile, outfile):
6969 ser = CompressedSerializer (pickleSer )
7070 for _ in range (num_broadcast_variables ):
7171 bid = read_long (infile )
72- if bid > 0 :
72+ if bid >= 0 :
7373 value = ser ._read_with_length (infile )
7474 _broadcastRegistry [bid ] = Broadcast (bid , value )
7575 else :
76- _broadcastRegistry .pop (- bid , None )
76+ bid = - bid - 1
77+ _broadcastRegistry .pop (bid , None )
7778
7879 command = pickleSer ._read_with_length (infile )
7980 (func , deserializer , serializer ) = command
You can’t perform that action at this time.
0 commit comments