destroy(blocking: bool = False) → None¶
Destroy all data and metadata related to this broadcast variable. Use this with caution; once a broadcast variable has been destroyed, it cannot be used again.
Changed in version 3.0.0: Added optional argument blocking to specify whether to block until all blocks are deleted.
- blockingbool, optional, default False
Whether to block until unpersisting has completed.
>>> b = spark.sparkContext.broadcast([1, 2, 3, 4, 5])
Destroy all data and metadata related to this broadcast variable