[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.
This commit is contained in:
parent
c4ab255e94
commit
d7f2c19867
|
@ -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)
|
||||
#'}
|
||||
|
|
|
@ -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)
|
||||
#'}
|
||||
|
|
|
@ -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", {
|
||||
|
|
Loading…
Reference in a new issue