Skip to content

BroadcastFactory

BroadcastFactory is an abstraction of broadcast variable factories that BroadcastManager uses to create or delete (unbroadcast) broadcast variables.

Contract

Initializing

initialize(
  isDriver: Boolean,
  conf: SparkConf): Unit
Procedure

initialize is a procedure (returns Unit) so what happens inside stays inside (paraphrasing the former advertising slogan of Las Vegas, Nevada).

See:

Used when:

Creating Broadcast Variable

newBroadcast[T: ClassTag](
  value: T,
  isLocal: Boolean,
  id: Long,
  serializedOnly: Boolean = false): Broadcast[T]

See:

Used when:

Stopping

stop(): Unit
Procedure

stop is a procedure (returns Unit) so what happens inside stays inside (paraphrasing the former advertising slogan of Las Vegas, Nevada).

See:

Used when:

  • BroadcastManager is requested to stop

Deleting Broadcast Variable

unbroadcast(
  id: Long,
  removeFromDriver: Boolean,
  blocking: Boolean): Unit
Procedure

unbroadcast is a procedure (returns Unit) so what happens inside stays inside (paraphrasing the former advertising slogan of Las Vegas, Nevada).

See:

Used when:

Implementations