persist {SparkR}R Documentation

Persist an RDD

Description

Persist this RDD with the specified storage level. For details of the supported storage levels, refer to http://spark.apache.org/docs/latest/programming-guide.html#rdd-persistence.

Usage

persist(rdd, newLevel)

## S4 method for signature 'RDD,character'
persist(rdd, newLevel = c("DISK_ONLY",
  "DISK_ONLY_2", "MEMORY_AND_DISK", "MEMORY_AND_DISK_2", "MEMORY_AND_DISK_SER",
  "MEMORY_AND_DISK_SER_2", "MEMORY_ONLY", "MEMORY_ONLY_2", "MEMORY_ONLY_SER",
  "MEMORY_ONLY_SER_2", "OFF_HEAP"))

Arguments

rdd

The RDD to persist

newLevel

The new storage level to be assigned

Examples

## Not run: 
##D sc <- sparkR.init()
##D rdd <- parallelize(sc, 1:10, 2L)
##D persist(rdd, "MEMORY_AND_DISK")
## End(Not run)

[Package SparkR version 0.1 Index]