aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorkrishnakalyan3 <krishnakalyan3@gmail.com>2016-07-18 09:46:23 -0700
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2016-07-18 09:46:23 -0700
commit8ea3f4eaec65ee4277f9943063fcc9488d3fa924 (patch)
tree4b69fb3034d4bdf3da54dfc28390352c550677d1 /R
parenta529fc944209e7255ec5858b33490212884d6c60 (diff)
downloadspark-8ea3f4eaec65ee4277f9943063fcc9488d3fa924.tar.gz
spark-8ea3f4eaec65ee4277f9943063fcc9488d3fa924.tar.bz2
spark-8ea3f4eaec65ee4277f9943063fcc9488d3fa924.zip
[SPARK-16055][SPARKR] warning added while using sparkPackages with spark-submit
## What changes were proposed in this pull request? https://issues.apache.org/jira/browse/SPARK-16055 sparkPackages - argument is passed and we detect that we are in the R script mode, we should print some warning like --packages flag should be used with with spark-submit ## How was this patch tested? In my system locally Author: krishnakalyan3 <krishnakalyan3@gmail.com> Closes #14179 from krishnakalyan3/spark-pkg.
Diffstat (limited to 'R')
-rw-r--r--R/pkg/R/sparkR.R4
1 files changed, 4 insertions, 0 deletions
diff --git a/R/pkg/R/sparkR.R b/R/pkg/R/sparkR.R
index 62659b0c0c..ff5297ffd5 100644
--- a/R/pkg/R/sparkR.R
+++ b/R/pkg/R/sparkR.R
@@ -155,6 +155,10 @@ sparkR.sparkContext <- function(
existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "")
if (existingPort != "") {
+ if (length(packages) != 0) {
+ warning(paste("sparkPackages has no effect when using spark-submit or sparkR shell",
+ " please use the --packages commandline instead", sep = ","))
+ }
backendPort <- existingPort
} else {
path <- tempfile(pattern = "backend_port")