Skip to content

SPARK-1691: Support quoted arguments inside of spark-submit. #609

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

pwendell
Copy link
Contributor

@pwendell pwendell commented May 1, 2014

This is a fairly straightforward fix. The bug was reported by @vanzin and the fix was proposed by @deanwampler and myself. Please take a look!

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14603/

@pwendell
Copy link
Contributor Author

pwendell commented May 1, 2014

Since this was already vetted by a few folks on the mailing list I'm gonna go ahead an merge it.

asfgit pushed a commit that referenced this pull request May 1, 2014
This is a fairly straightforward fix. The bug was reported by @vanzin and the fix was proposed by @deanwampler and myself. Please take a look!

Author: Patrick Wendell <pwendell@gmail.com>

Closes #609 from pwendell/quotes and squashes the following commits:

8bed767 [Patrick Wendell] SPARK-1691: Support quoted arguments inside of spark-submit.
(cherry picked from commit 98b6559)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>
@asfgit asfgit closed this in 98b6559 May 1, 2014
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
This is a fairly straightforward fix. The bug was reported by @vanzin and the fix was proposed by @deanwampler and myself. Please take a look!

Author: Patrick Wendell <pwendell@gmail.com>

Closes apache#609 from pwendell/quotes and squashes the following commits:

8bed767 [Patrick Wendell] SPARK-1691: Support quoted arguments inside of spark-submit.
@cosmicangler
Copy link

Is this fix in 1.0 as I am still getting this error when submitting with yarn?

@vanzin
Copy link
Contributor

vanzin commented Jun 26, 2014

@cosmicangler yes:
dd601bf

If you're running into some issue with submitting jobs, probably better to ask on the list or file a bug.

@cosmicangler
Copy link

Thank you for hte I can file a bug but my problem is this bug that marked fixed but not corrected in the 1.0 distribution I am using. I am unable to use quoted arguments for --driver-java-options as discussed in this bug.

Should a submit another identical bug to this one?

@vanzin
Copy link
Contributor

vanzin commented Jun 26, 2014

Being the person who reported the original bug :-), the issue for me was not quotes inside --driver-java-options, but providing several arguments (e.g. --driver-java-options "-Dfoo -Dbar" would not work, as the example in the jira issue shows). So maybe the commit description is a little misleading.

That issue is definitely fixed, so it sounds like your problem is different (e.g. sounds like you want quotes to be propagated to the driver but that's not happening).

@cosmicangler
Copy link

That is correct. That is precisely what is not working for me int he 1.0 distribution. I am looking to do a --driver-java-options "-XX:+UseParallelOldGC -XX:parallelGCThreads=8"

I get -XX:parallelGCThreads=8 is not a class error as it doesn't appear to be respecting the " ". Maybe there is an issue the version our ops folks used in our clusters. Was this fixed in 1.0 master?

@vanzin
Copy link
Contributor

vanzin commented Jun 26, 2014

That is working fine for me. Looks like an issue with your deployment. The fix is both in branch-1.0 and master (there's no such thing as "1.0 master").

@cosmicangler
Copy link

Thanks

@koertkuipers
Copy link
Contributor

on the command line i can get this to work now, but its still way beyond my bash skills to use "exec spark-submit" inside a script with multiple java options. this is a fairly normal use case i imagine if you want to launch an application using spark-submit.

for example my attempt to launch SparkPi with multiple java options is below. when i run it i get:
$ ./pi
spark-submit --class org.apache.spark.examples.SparkPi --driver-java-options "-Dfoo=a -Dbar=b" /usr/lib/spark/examples/lib/spark-examples_2.10-1.0.0-cdh5.1.0.jar
Error: Could not find or load main class "-Dfoo=a

i have no doubt its me that is doing something wrong here, but it shouldnt be this hard to use... perhaps a different syntax would make life easier?
best, koert

$ more pi
#!/bin/bash -e

DRIVER_JAVA_OPTS="-Dfoo=a -Dbar=b"
SPARK_SUBMIT="spark-submit"

OPTS=""
OPTS+=" --class org.apache.spark.examples.SparkPi"
OPTS+=" --driver-java-options "${DRIVER_JAVA_OPTS}""

echo $SPARK_SUBMIT $OPTS /usr/lib/spark/examples/lib/spark-examples_2.10-1.0.0-cdh5.1.0.jar
exec $SPARK_SUBMIT $OPTS /usr/lib/spark/examples/lib/spark-examples_2.10-1.0.0-cdh5.1.0.jar

chuckchen pushed a commit to chuckchen/spark that referenced this pull request Jun 25, 2015
SPARK-738 (branch 0.7 backport) Fixing nonserializable exception bug
@ganeshm25
Copy link

@koertkuipers i am trying to do achieve running the multiple driver-java-options with Spark 1.4.2 inside a bash script? is there a solution you found for this ?

@koertkuipers
Copy link
Contributor

@ganeshm25 it seems to work in newer spark versions. i havent tried in spark 1.4.2. however its still very tricky to get it right and i would prefer a simpler solution.

@ganeshm25
Copy link

@koertkuipers can you the most recent syntax that you used to achieve the same?

@koertkuipers
Copy link
Contributor

OPTS+=" --driver-java-options \"-Da=b -Dx=y\""

RolatZhang pushed a commit to RolatZhang/spark that referenced this pull request Aug 18, 2023
…ache#609)

AL-8127 fix snyk, upgrade tomcat-embed-core from 9.0.68 to 9.0.72
RolatZhang pushed a commit to RolatZhang/spark that referenced this pull request Aug 18, 2023
Ke 4.6.8.0 newten cherrypick

* KE-41667 CDP 7.1 support hive client 3.1 (apache#612)

* KE-41667 [FOLLOW UP] fix error (apache#614)

* AL-8127 fix snyk, upgrade tomcat-embed-core from 9.0.68 to 9.0.72 (apache#609)

AL-8127 fix snyk, upgrade tomcat-embed-core from 9.0.68 to 9.0.72

---------

Co-authored-by: jlf <longfei.jiang@kyligence.io>
RolatZhang pushed a commit to RolatZhang/spark that referenced this pull request Dec 8, 2023
Ke 4.6.8.0 newten cherrypick

* KE-41667 CDP 7.1 support hive client 3.1 (apache#612)

* KE-41667 [FOLLOW UP] fix error (apache#614)

* AL-8127 fix snyk, upgrade tomcat-embed-core from 9.0.68 to 9.0.72 (apache#609)

AL-8127 fix snyk, upgrade tomcat-embed-core from 9.0.68 to 9.0.72

---------

Co-authored-by: jlf <longfei.jiang@kyligence.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants