pan3793 commented on code in PR #52261:
URL: https://github.com/apache/spark/pull/52261#discussion_r2331766293


##########
core/src/main/scala/org/apache/spark/deploy/SparkPipelines.scala:
##########
@@ -62,16 +63,16 @@ object SparkPipelines extends Logging {
         if (opt == "--remote") {
           remote = value
         } else if (opt == "--class") {
-          logInfo("--class argument not supported.")
-          throw SparkUserAppException(SparkExitCode.EXIT_FAILURE)
-        } else if (opt == "--conf" &&
-          value.startsWith("spark.api.mode=") &&
-          value != "spark.api.mode=connect") {
-          logInfo(
-            "--spark.api.mode must be 'connect'. " +
-            "Declarative Pipelines currently only supports Spark Connect."
-          )
+          logError("--class argument not supported.")
           throw SparkUserAppException(SparkExitCode.EXIT_FAILURE)
+        } else if (opt == "--conf" && value.startsWith("spark.api.mode=")) {
+          if (value.toLowerCase(Locale.ROOT) != "spark.api.mode=connect") {

Review Comment:
   oh interesting, 
   
   ```
   $ spark-submit run-example --conf "spark.submit.deployMode= cluster" SparkPi 
10
   ...
   Exception in thread "main" org.apache.spark.SparkException: Deploy mode must 
be either client or cluster
   ...
   ```
   
   but this works
   ```
   $ spark-submit run-example --conf "spark.api.mode= connect" SparkPi 10
   ```



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to