Broadcast<T> Class

Definition

A broadcast variable. Broadcast variables allow the programmer to keep a read-only variable cached on each machine rather than shipping a copy of it with tasks. They can be used, for example, to give every node a copy of a large input dataset in an efficient manner. Spark also attempts to distribute broadcast variables using efficient broadcast algorithms to reduce communication cost.

[System.Serializable]
public sealed class Broadcast<T>
[<System.Serializable>]
type Broadcast<'T> = class
Public NotInheritable Class Broadcast(Of T)

Type Parameters

T
Inheritance
Broadcast<T>
Attributes

Methods

Destroy()

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. This method blocks until destroy has completed.

Unpersist()

Asynchronously delete cached copies of this broadcast on the executors. If the broadcast is used after this is called, it will need to be re-sent to each executor.

Unpersist(Boolean)

Delete cached copies of this broadcast on the executors. If the broadcast is used after this is called, it will need to be re-sent to each executor.

Value()

Get the broadcasted value.

Applies to