broadcast

inline fun <T> SparkSession.broadcast(value: T): Broadcast<T>

Broadcast a read-only variable to the cluster, returning a org.apache.spark.broadcast.Broadcast object for reading it in distributed functions. The variable will be sent to each cluster only once.

Return

Broadcast object, a read-only variable cached on each machine

Parameters

value

value to broadcast to the Spark nodes


inline fun <T> SparkContext.broadcast(value: T): Broadcast<T>

Deprecated

You can now use `spark.broadcast()` instead.

Replace with

spark.broadcast(value)

Broadcast a read-only variable to the cluster, returning a org.apache.spark.broadcast.Broadcast object for reading it in distributed functions. The variable will be sent to each cluster only once.

Return

Broadcast object, a read-only variable cached on each machine

Parameters

value

value to broadcast to the Spark nodes

See also