Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31530

Spark submit fails if we provide extraJavaOption which contains Xmx as substring

    XMLWordPrintableJSON

Details

    Description

      Spark submit doesn't allow Xmx anywhere in the spark.driver.extraJavaOptions
      For eg:

      bin\spark-submit --class org.apache.spark.examples.SparkPi --master local[*] --conf "spark.driver.extraJavaOptions=-DmyKey=MyValueContainsXmx" examples\jars\spark-examples_2.11-2.4.4.jar
      Error: Not allowed to specify max heap(Xmx) memory settings through java options (was -DmyKey=MyValueContainsXmx). Use the corresponding --driver-memory or spark.driver.memory configuration instead.

      https://github.com/apache/spark/blob/v2.4.4/launcher/src/main/java/org/apache/spark/launcher/SparkClassCommandBuilder.java#L102

      https://github.com/apache/spark/blob/master/launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java#L302

      Can we update the above condition to check more specific for eg -Xmx

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            MayankPande88 Mayank
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: