nerdexam
Databricks

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK · Question #104

Which of the following best describes the similarities and differences between the MEMORY_ONLY storage level and the MEMORY_AND_DISK storage level?

The correct answer is D. The MEMORY_ONLY storage level will store as much data as possible in memory and will. MEMORY_ONLY stores RDD partitions as deserialized Java/JVM objects in heap memory. If not all partitions fit in memory, the ones that don't fit are simply dropped and will be recomputed from scratch when needed - they are never persisted anywhere. MEMORY_AND_DISK also stores…

Spark Core Concepts

Question

Which of the following best describes the similarities and differences between the MEMORY_ONLY storage level and the MEMORY_AND_DISK storage level?

Options

  • AThe MEMORY_ONLY storage level will store as much data as possible in memory and will store
  • BThe MEMORY_ONLY storage level will store as much data as possible in memory on two cluster
  • CThe MEMORY_ONLY storage level will store as much data as possible in memory on two cluster
  • DThe MEMORY_ONLY storage level will store as much data as possible in memory and will
  • EThe MEMORY_ONLY storage level will store as much data as possible in memory and will

How the community answered

(50 responses)
  • A
    2% (1)
  • B
    6% (3)
  • D
    90% (45)
  • E
    2% (1)

Explanation

MEMORY_ONLY stores RDD partitions as deserialized Java/JVM objects in heap memory. If not all partitions fit in memory, the ones that don't fit are simply dropped and will be recomputed from scratch when needed - they are never persisted anywhere. MEMORY_AND_DISK also stores data in memory first, but partitions that do not fit in memory are serialized and written to disk instead of being discarded. This is the critical difference: MEMORY_ONLY recomputes overflow partitions; MEMORY_AND_DISK spills overflow partitions to disk. Answer D correctly captures this distinction.

Topics

#Spark Storage Levels#RDD Persistence#Spark Caching#Performance Optimization

Community Discussion

No community discussion yet for this question.

Full DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Practice