Skip to content

Commit 8ea3f4e

Browse files
krishnakalyan3shivaram
authored andcommitted
[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 <[email protected]> Closes #14179 from krishnakalyan3/spark-pkg.
1 parent a529fc9 commit 8ea3f4e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/pkg/R/sparkR.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ sparkR.sparkContext <- function(
155155

156156
existingPort <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "")
157157
if (existingPort != "") {
158+
if (length(packages) != 0) {
159+
warning(paste("sparkPackages has no effect when using spark-submit or sparkR shell",
160+
" please use the --packages commandline instead", sep = ","))
161+
}
158162
backendPort <- existingPort
159163
} else {
160164
path <- tempfile(pattern = "backend_port")

0 commit comments

Comments
 (0)