aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/R/sparkR.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/pkg/R/sparkR.R')
-rw-r--r--R/pkg/R/sparkR.R9
1 files changed, 6 insertions, 3 deletions
diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R
index 76c15875b5..e83104f116 100644
--- a/R/pkg/R/sparkR.R
+++ b/R/pkg/R/sparkR.R
@@ -22,7 +22,8 @@
connExists <- function(env) {
tryCatch({
exists(".sparkRCon", envir = env) && isOpen(env[[".sparkRCon"]])
- }, error = function(err) {
+ },
+ error = function(err) {
return(FALSE)
})
}
@@ -153,7 +154,8 @@ sparkR.init <- function(
.sparkREnv$backendPort <- backendPort
tryCatch({
connectBackend("localhost", backendPort)
- }, error = function(err) {
+ },
+ error = function(err) {
stop("Failed to connect JVM\n")
})
@@ -264,7 +266,8 @@ sparkRHive.init <- function(jsc = NULL) {
ssc <- callJMethod(sc, "sc")
hiveCtx <- tryCatch({
newJObject("org.apache.spark.sql.hive.HiveContext", ssc)
- }, error = function(err) {
+ },
+ error = function(err) {
stop("Spark SQL is not built with Hive support")
})