Interface BroadcastFactory


public interface BroadcastFactory
An interface for all the broadcast implementations in Spark (to allow multiple broadcast implementations). SparkContext uses a BroadcastFactory implementation to instantiate a particular broadcast for the entire Spark job.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(boolean isDriver, SparkConf conf)
     
    <T> Broadcast<T>
    newBroadcast(T value, boolean isLocal, long id, boolean serializedOnly, scala.reflect.ClassTag<T> evidence$1)
    Creates a new broadcast variable.
    void
     
    void
    unbroadcast(long id, boolean removeFromDriver, boolean blocking)
     
  • Method Details

    • initialize

      void initialize(boolean isDriver, SparkConf conf)
    • newBroadcast

      <T> Broadcast<T> newBroadcast(T value, boolean isLocal, long id, boolean serializedOnly, scala.reflect.ClassTag<T> evidence$1)
      Creates a new broadcast variable.

      Parameters:
      value - value to broadcast
      isLocal - whether we are in local mode (single JVM process)
      id - unique id representing this broadcast variable
      serializedOnly - if true, do not cache the unserialized value on the driver
      evidence$1 - (undocumented)
      Returns:
      Broadcast object, a read-only variable cached on each machine
    • stop

      void stop()
    • unbroadcast

      void unbroadcast(long id, boolean removeFromDriver, boolean blocking)