QuestionQ198

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following code blocks attempts to cache only the partitions of the storesDF DataFrame in Spark memory?

Explanation

DataFrame.persist accepts a StorageLevel, and StorageLevel.MEMORY_ONLY explicitly persists partitions in memory without disk storage. The default levels used by cache() and parameterless persist() include both memory and disk.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!