diff options
author | hlin09 <hlin09pu@gmail.com> | 2015-04-13 16:53:50 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-04-13 16:53:50 -0700 |
commit | d7f2c198678d1f5ffc1c6da3a6fb189b0a4ef070 (patch) | |
tree | 6f3f230a52909e00dde3c10324daad6b20eefca1 /R | |
parent | c4ab255e94366ba9b9023d5431f9d2412e0d6dc7 (diff) | |
download | spark-d7f2c198678d1f5ffc1c6da3a6fb189b0a4ef070.tar.gz spark-d7f2c198678d1f5ffc1c6da3a6fb189b0a4ef070.tar.bz2 spark-d7f2c198678d1f5ffc1c6da3a6fb189b0a4ef070.zip |
[SPARK-6881][SparkR] Changes the checkpoint directory name.
Author: hlin09 <hlin09pu@gmail.com>
Closes #5493 from hlin09/fixCheckpointDir and squashes the following commits:
e67fc40 [hlin09] Change to temp dir.
1f7ed9e [hlin09] Change the checkpoint dir name.
Diffstat (limited to 'R')
-rw-r--r-- | R/pkg/R/RDD.R | 2 | ||||
-rw-r--r-- | R/pkg/R/context.R | 2 | ||||
-rw-r--r-- | R/pkg/inst/tests/test_rdd.R | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/R/pkg/R/RDD.R b/R/pkg/R/RDD.R index 604ad03c40..d6a75007a6 100644 --- a/R/pkg/R/RDD.R +++ b/R/pkg/R/RDD.R @@ -279,7 +279,7 @@ setMethod("unpersist", #' @examples #'\dontrun{ #' sc <- sparkR.init() -#' setCheckpointDir(sc, "checkpoints") +#' setCheckpointDir(sc, "checkpoint") #' rdd <- parallelize(sc, 1:10, 2L) #' checkpoint(rdd) #'} diff --git a/R/pkg/R/context.R b/R/pkg/R/context.R index 2fc0bb294b..ebbb8fba10 100644 --- a/R/pkg/R/context.R +++ b/R/pkg/R/context.R @@ -216,7 +216,7 @@ broadcast <- function(sc, object) { #' @examples #'\dontrun{ #' sc <- sparkR.init() -#' setCheckpointDir(sc, "~/checkpoints") +#' setCheckpointDir(sc, "~/checkpoint") #' rdd <- parallelize(sc, 1:2, 2L) #' checkpoint(rdd) #'} diff --git a/R/pkg/inst/tests/test_rdd.R b/R/pkg/inst/tests/test_rdd.R index f75e0817b9..b76e4db03e 100644 --- a/R/pkg/inst/tests/test_rdd.R +++ b/R/pkg/inst/tests/test_rdd.R @@ -141,7 +141,8 @@ test_that("PipelinedRDD support actions: cache(), persist(), unpersist(), checkp unpersist(rdd2) expect_false(rdd2@env$isCached) - setCheckpointDir(sc, "checkpoints") + tempDir <- tempfile(pattern = "checkpoint") + setCheckpointDir(sc, tempDir) checkpoint(rdd2) expect_true(rdd2@env$isCheckpointed) @@ -152,7 +153,7 @@ test_that("PipelinedRDD support actions: cache(), persist(), unpersist(), checkp # make sure the data is collectable collect(rdd2) - unlink("checkpoints") + unlink(tempDir) }) test_that("reduce on RDD", { |