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


##########
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") {
+            logError(
+              "--spark.api.mode must be 'connect'. " +
+                "Declarative Pipelines currently only supports Spark Connect."
+            )
+            throw SparkUserAppException(SparkExitCode.EXIT_FAILURE)
+          }

Review Comment:
   Since we always append `--conf spark.api.mode=connect` at the end, here we 
simply ignore the user-passed value.



-- 
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