You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/09/01 08:07:51 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #33887: [SPARK-36631][R] Ask users if they want to download and install SparkR in non Spark scripts

HyukjinKwon commented on a change in pull request #33887:
URL: https://github.com/apache/spark/pull/33887#discussion_r699980663



##########
File path: R/pkg/R/sparkR.R
##########
@@ -655,6 +655,45 @@ sparkCheckInstall <- function(sparkHome, master, deployMode) {
     } else {
       if (interactive() || isMasterLocal(master)) {
         message("Spark not found in SPARK_HOME: ", sparkHome)
+        # If EXISTING_SPARKR_BACKEND_PORT environment variable is set, assume
+        # that we're in Spark submit. spark-submit always sets Spark home
+        # so this case should not happen. This is just a safeguard.
+        isSparkRSubmit <- Sys.getenv("EXISTING_SPARKR_BACKEND_PORT", "") != ""

Review comment:
       This is the same way as above:
   https://github.com/apache/spark/blob/0494dc90af48ce7da0625485a4dc6917a244d580/R/pkg/R/sparkR.R#L153-L155




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org