What is Broadcast Variables?

Viewing 1 reply thread
  • Author
    Posts
    • #4971
      DataFlair TeamDataFlair Team
      Spectator

      Explain Broadcast Variables. what are the advantages of Broadcast Variables? Where should we use them ?

    • #4972
      DataFlair TeamDataFlair Team
      Spectator

      Broadcast variables are variables that are shared throughout the cluster. Broadcast variables need to be able to slot in memory on one machine. which means that they mustn’t be something super massive, sort of a massive table or large vector. Secondly, broadcast variables area cannot be changed, which means that they can’t be modified. If you want to change or modify, accumulators are needed.
      The properties of Broadcast Variable in Apache Spark are:

      1. Immutable
      2. Distributed to the cluster
      3. Fit in memory
Viewing 1 reply thread
  • You must be logged in to reply to this topic.