diff --git a/R/pkg/R/DataFrame.R b/R/pkg/R/DataFrame.R index 81b4e6b91d8a2..8c48df7ac8be8 100644 --- a/R/pkg/R/DataFrame.R +++ b/R/pkg/R/DataFrame.R @@ -491,7 +491,10 @@ setMethod("cache", #' #' Persist this DataFrame with the specified storage level. For details of the #' supported storage levels, refer to -#' \url{http://spark.apache.org/docs/latest/programming-guide.html#rdd-persistence}. +#' \url{http://spark.apache.org/docs/latest/programming-guide.html#rdd-persistence}. \cr +#' The following four storage level constants are deprecated in 2.0, +#' since the records will always be serialized in R: \cr +#' MEMORY_ONLY_SER, MEMORY_ONLY_SER_2, MEMORY_AND_DISK_SER, MEMORY_AND_DISK_SER_2 #' #' @param x The DataFrame to persist #' diff --git a/R/pkg/R/RDD.R b/R/pkg/R/RDD.R index 00c40c38cabc9..2a4b05a9834db 100644 --- a/R/pkg/R/RDD.R +++ b/R/pkg/R/RDD.R @@ -225,7 +225,10 @@ setMethod("cache", #' #' 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. +#' http://spark.apache.org/docs/latest/programming-guide.html#rdd-persistence. \cr +#' The following four storage level constants are deprecated in 2.0, +#' since the records will always be serialized in R: \cr +#' MEMORY_ONLY_SER, MEMORY_ONLY_SER_2, MEMORY_AND_DISK_SER, MEMORY_AND_DISK_SER_2 #' #' @param x The RDD to persist #' @param newLevel The new storage level to be assigned diff --git a/R/pkg/R/utils.R b/R/pkg/R/utils.R index 43105aaa38424..4aa1978d892f1 100644 --- a/R/pkg/R/utils.R +++ b/R/pkg/R/utils.R @@ -339,14 +339,15 @@ getStorageLevel <- function(newLevel = c("DISK_ONLY", storageLevel <- switch(newLevel, "DISK_ONLY" = callJStatic(storageLevelClass, "DISK_ONLY"), "DISK_ONLY_2" = callJStatic(storageLevelClass, "DISK_ONLY_2"), - "MEMORY_AND_DISK" = callJStatic(storageLevelClass, "MEMORY_AND_DISK"), - "MEMORY_AND_DISK_2" = callJStatic(storageLevelClass, "MEMORY_AND_DISK_2"), + "MEMORY_AND_DISK" = callJStatic(storageLevelClass, "MEMORY_AND_DISK_SER"), + "MEMORY_AND_DISK_2" = callJStatic(storageLevelClass, + "MEMORY_AND_DISK_SER_2"), "MEMORY_AND_DISK_SER" = callJStatic(storageLevelClass, "MEMORY_AND_DISK_SER"), "MEMORY_AND_DISK_SER_2" = callJStatic(storageLevelClass, "MEMORY_AND_DISK_SER_2"), - "MEMORY_ONLY" = callJStatic(storageLevelClass, "MEMORY_ONLY"), - "MEMORY_ONLY_2" = callJStatic(storageLevelClass, "MEMORY_ONLY_2"), + "MEMORY_ONLY" = callJStatic(storageLevelClass, "MEMORY_ONLY_SER"), + "MEMORY_ONLY_2" = callJStatic(storageLevelClass, "MEMORY_ONLY_SER_2"), "MEMORY_ONLY_SER" = callJStatic(storageLevelClass, "MEMORY_ONLY_SER"), "MEMORY_ONLY_SER_2" = callJStatic(storageLevelClass, "MEMORY_ONLY_SER_2"), "OFF_HEAP" = callJStatic(storageLevelClass, "OFF_HEAP"))