James has a requirement not to use an RDD over and over again and need to persist it for batch operations for later purpose. What is the syntax/code shall be used by him?

rdd.persist(StorageLevel.MEMORY_ONLY)

rdd.persist(StorageLevel.MEMORY_AND_DISK)

rdd.persist(StorageLevel.MEMORY_AND_DISK_SER)

rdd.save(StorageLevel.MEMORY_DISKMEMORY)
 

Verified Answer
Correct Option - c

To get all Infosys Certified Spark Developer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram