Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pyspark.Broadcast.dump#

Broadcast.dump(value,f)[source]#

Write a pickled representation of value to the open file or socket.The protocol pickle is HIGHEST_PROTOCOL.

Parameters
valueT

Value to write.

fBinaryIO

File or socket where the pickled value will be stored.

Examples

>>>importos>>>importtempfile
>>>b=spark.sparkContext.broadcast([1,2,3,4,5])

Write a pickled representation ofb to the open temp file.

>>>withtempfile.TemporaryDirectory(prefix="dump")asd:...path=os.path.join(d,"test.txt")...withopen(path,"wb")asf:...b.dump(b.value,f)

[8]ページ先頭

©2009-2025 Movatter.jp