May 2017
Intermediate to advanced
294 pages
7h 33m
English
The following are the steps to add appropriate persistence levels:
$ spark-shell
scala> import org.apache.spark.storage.StorageLevel._
scala> val words = spark.read.textFile("words")
scala> words.persist(MEMORY_ONLY_SER)
Though serialization reduces the memory footprint substantially, it adds extra CPU cycles due to deserialization.
Read now
Unlock full access