Why RDD is immutable ?

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

      Why RDD is immutable ?

    • #6097
      DataFlair TeamDataFlair Team
      Spectator

      Following are the reasons:
      – Immutable data is always safe to share across multiple processes as well as multiple threads.
      – Since RDD is immutable we can recreate the RDD any time. (From lineage graph).
      – If the computation is time-consuming, in that we can cache the RDD which result in performance improvement.

      Please add more points if I am missing something
      RDDs are also fault-tolerant and evaluate lazily for more information read Fault tolerance in Spark and Lazy evaluation in Spark.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.