diff --git a/R/pkg/R/deserialize.R b/R/pkg/R/deserialize.R index d04ec47e60200..dad6f546f2b91 100644 --- a/R/pkg/R/deserialize.R +++ b/R/pkg/R/deserialize.R @@ -154,7 +154,7 @@ readRowList <- function(obj) { # deserialize the row. rawObj <- rawConnection(obj, "r+") on.exit(close(rawObj)) - SparkR:::readRow(rawObj) + readRow(rawObj) } readRow <- function(inputCon) { diff --git a/R/pkg/R/pairRDD.R b/R/pkg/R/pairRDD.R index 7929a29c00e1d..c2396c32a7548 100644 --- a/R/pkg/R/pairRDD.R +++ b/R/pkg/R/pairRDD.R @@ -708,9 +708,9 @@ setMethod("cogroup", acc <- res[[i]] # Create an accumulator. if (is.null(acc)) { - acc <- SparkR:::initAccumulator() + acc <- initAccumulator() } - SparkR:::addItemToAccumulator(acc, x[[2]]) + addItemToAccumulator(acc, x[[2]]) res[[i]] <- acc } lapply(res, function(acc) { diff --git a/R/pkg/R/serialize.R b/R/pkg/R/serialize.R index 08e1215e1bfbe..e78908bfa32fd 100644 --- a/R/pkg/R/serialize.R +++ b/R/pkg/R/serialize.R @@ -101,7 +101,7 @@ writeRowSerialize <- function(outputCon, rows) { serializeRow <- function(row) { rawObj <- rawConnection(raw(0), "wb") on.exit(close(rawObj)) - SparkR:::writeRow(rawObj, row) + writeRow(rawObj, row) rawConnectionValue(rawObj) } diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R index b149122dc7247..bc82df01f0fff 100644 --- a/R/pkg/R/sparkR.R +++ b/R/pkg/R/sparkR.R @@ -37,7 +37,7 @@ connExists <- function(env) { sparkR.stop <- function() { env <- .sparkREnv if (exists(".sparkRCon", envir = env)) { - cat("Stopping SparkR\n") + # cat("Stopping SparkR\n") if (exists(".sparkRjsc", envir = env)) { sc <- get(".sparkRjsc", envir = env) callJMethod(sc, "stop") diff --git a/R/pkg/R/utils.R b/R/pkg/R/utils.R index 7dafb33704b52..c337fb0751e72 100644 --- a/R/pkg/R/utils.R +++ b/R/pkg/R/utils.R @@ -299,17 +299,17 @@ getStorageLevel <- function(newLevel = c("DISK_ONLY", "OFF_HEAP")) { match.arg(newLevel) storageLevel <- switch(newLevel, - "DISK_ONLY" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "DISK_ONLY"), - "DISK_ONLY_2" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "DISK_ONLY_2"), - "MEMORY_AND_DISK" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK"), - "MEMORY_AND_DISK_2" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK_2"), - "MEMORY_AND_DISK_SER" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK_SER"), - "MEMORY_AND_DISK_SER_2" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK_SER_2"), - "MEMORY_ONLY" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY"), - "MEMORY_ONLY_2" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY_2"), - "MEMORY_ONLY_SER" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY_SER"), - "MEMORY_ONLY_SER_2" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY_SER_2"), - "OFF_HEAP" = SparkR:::callJStatic("org.apache.spark.storage.StorageLevel", "OFF_HEAP")) + "DISK_ONLY" = callJStatic("org.apache.spark.storage.StorageLevel", "DISK_ONLY"), + "DISK_ONLY_2" = callJStatic("org.apache.spark.storage.StorageLevel", "DISK_ONLY_2"), + "MEMORY_AND_DISK" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK"), + "MEMORY_AND_DISK_2" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK_2"), + "MEMORY_AND_DISK_SER" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK_SER"), + "MEMORY_AND_DISK_SER_2" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_AND_DISK_SER_2"), + "MEMORY_ONLY" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY"), + "MEMORY_ONLY_2" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY_2"), + "MEMORY_ONLY_SER" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY_SER"), + "MEMORY_ONLY_SER_2" = callJStatic("org.apache.spark.storage.StorageLevel", "MEMORY_ONLY_SER_2"), + "OFF_HEAP" = callJStatic("org.apache.spark.storage.StorageLevel", "OFF_HEAP")) } # Utility function for functions where an argument needs to be integer but we want to allow