You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Andrew Or (JIRA)" <ji...@apache.org> on 2014/07/29 03:11:38 UTC

[jira] [Created] (SPARK-2722) Mechanism for escaping spark configs is not consistent

Andrew Or created SPARK-2722:
--------------------------------

             Summary: Mechanism for escaping spark configs is not consistent
                 Key: SPARK-2722
                 URL: https://issues.apache.org/jira/browse/SPARK-2722
             Project: Spark
          Issue Type: Bug
    Affects Versions: 1.0.1
            Reporter: Andrew Or
            Priority: Minor
             Fix For: 1.1.0


Currently, you can specify a spark config in spark-defaults.conf as follows:
{code}
spark.magic "Mr. Johnson"
{code}
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
{code}
spark.executor.extraJavaOptions "-Dmagic=\"Mr. Johnson\""
{code}
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
{code}
spark.executor.extraJavaOptions "-Dmagic=\\\"Mr. Johnson\\\""
{code}
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).



--
This message was sent by Atlassian JIRA
(v6.2#6252)