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

Mechanism for escaping spark configs is not consistent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.0.1
    • None
    • Spark Core
    • None

    Description

      Currently, you can specify a spark config in spark-defaults.conf as follows:

      spark.magic "Mr. Johnson"
      

      and this will preserve the double quotes as part of the string. Naturally, if you want to do the equivalent in spark.*.extraJavaOptions, you would use the following:

      spark.executor.extraJavaOptions "-Dmagic=\"Mr. Johnson\""
      

      However, this fails because the backslashes go away and it tries to interpret "Johnson" as the main class argument. Instead, you have to do the following:

      spark.executor.extraJavaOptions "-Dmagic=\\\"Mr. Johnson\\\""
      

      which is not super intuitive.

      Note that this only applies to standalone mode. In YARN it's not even possible to use quoted strings in config values (SPARK-2718).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andrewor14 Andrew Or
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: