Skip to content
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

[SPARK-2849] bin/spark-submit should respect spark.driver.* for client mode #1770

Closed
wants to merge 26 commits into from

Conversation

andrewor14
Copy link
Contributor

We currently respect these configs only for cluster mode. From the names of the configs themselves, however, there is every reason for the user to believe that these should also apply for client mode. This currently does not work only because we're missing the code for it, and this PR adds this missing code.

@vanzin
Copy link
Contributor

vanzin commented Aug 4, 2014

Hmmm... what does "respect" mean here though? In client mode, the vm running SparkSubmit is the same one running the driver, so it's too late to do anything with spark.driver.extraJavaOptions, for example.

@SparkQA
Copy link

SparkQA commented Aug 4, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17870/consoleFull

@andrewor14
Copy link
Contributor Author

Good point... well, for spark.driver.extraJavaOptions we can manually add it to the system properties dynamically, and maybe we can do something similar for the other driver options too. However it looks like there's already existing logic for handling this in bin/spark-submit itself, though it doesn't seem to be working correctly. Investigating.

@andrewor14
Copy link
Contributor Author

Oops, looks like bin/spark-submit already handles this correctly.

However, the open issue is that if the user specifies spark.driver.* configs in spark-defaults.conf, they actually won't be processed in time. However, the user might expect these to be processed for all modes, so we still need to fix that. I have updated the JIRA and the title accordingly.

@andrewor14 andrewor14 changed the title [SPARK-2849] Spark submit should respect --driver-* for client mode [SPARK-2849] bin/spark-submit should respect spark.driver.* for client mode Aug 4, 2014
@andrewor14 andrewor14 changed the title [SPARK-2849] bin/spark-submit should respect spark.driver.* for client mode [WIP][SPARK-2849] bin/spark-submit should respect spark.driver.* for client mode Aug 4, 2014
@SparkQA
Copy link

SparkQA commented Aug 4, 2014

QA results for PR 1770:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17870/consoleFull

@andrewor14 andrewor14 changed the title [WIP][SPARK-2849] bin/spark-submit should respect spark.driver.* for client mode [SPARK-2849] bin/spark-submit should respect spark.driver.* for client mode Aug 6, 2014
@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17990/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17992/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA results for PR 1770:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17992/consoleFull

@andrewor14
Copy link
Contributor Author

test this please

@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17996/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA results for PR 1770:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17990/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA results for PR 1770:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17996/consoleFull

@andrewor14
Copy link
Contributor Author

test this please

@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18004/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 6, 2014

QA results for PR 1770:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18004/consoleFull

@andrewor14
Copy link
Contributor Author

test this please

@andrewor14
Copy link
Contributor Author

Before my latest set of commits we were not parsing quoted arguments (with whitespaces, quotes and backslashes and everything) properly. This is now fixed as of the latest changes, and I have included an example of what we expect from spark.*.extraJavaOptions in spark-defaults.conf.

@SparkQA
Copy link

SparkQA commented Aug 7, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18106/consoleFull

@pwendell
Copy link
Contributor

pwendell commented Aug 7, 2014

One proposal - maybe we can just say in the docs that explain spark-defaults.conf that we don't support multi-line options. I think the java properties format is very liberal in what it accepts, we can probably (at least initially) be more conservative here.

@SparkQA
Copy link

SparkQA commented Aug 7, 2014

QA results for PR 1770:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18106/consoleFull

@andrewor14
Copy link
Contributor Author

Well, we technically do support multi-line option, except for the very specific case of spark.driver.extra* in client mode. Maybe it's still worth a comment?

By the way, please don't merge this yet. I still need to verify whether the existing way of parsing these extra java options in scala is not affected.

The previous code used to ignore all closing quotes if the same token
also has an escaped double quote. For example, in

-Dkey="I am the \"man\""

the last token contains both escaped quotes and valid quotes. This
used to be interpreted as a token that doesn't have a closing quote
when it actually does. This is fixed in this commit.
@SparkQA
Copy link

SparkQA commented Aug 7, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18139/consoleFull

This is so that the way this is parsed and the way Java parses
its java opts is consistent.
@SparkQA
Copy link

SparkQA commented Aug 7, 2014

QA results for PR 1770:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18139/consoleFull

We previously never dealt with this correctly, in that we evaluated
all backslashes twice, once when passing spark.*.extraJavaOptions
into SparkSubmit, and another time when calling
Utils.splitCommandString.

This means we need to pass the raw values of these configs directly
to the JVM without evaluating the backslashes when launching
SparkSubmit. The way we do this is through a few custom environment
variables.

As of this commit, the user should follow the format outlined in
spark-defaults.conf.template for spark.*.extraJavaOptions, and
the expected java options (with quotes, whitespaces and backslashes
and everything) will be propagated to the driver or the executors
correctly.
... to highlight our new-found ability to deal with special values.
@SparkQA
Copy link

SparkQA commented Aug 8, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18160/consoleFull

@SparkQA
Copy link

SparkQA commented Aug 8, 2014

QA results for PR 1770:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18160/consoleFull

@andrewor14
Copy link
Contributor Author

The size of this PR is growing beyond the original expectation. I will close this and open another one that describes the issue the new changes are solving more precisely.

@SparkQA
Copy link

SparkQA commented Aug 8, 2014

QA tests have started for PR 1770. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18167/consoleFull

@andrewor14
Copy link
Contributor Author

Closing this in favor of #1845

@andrewor14 andrewor14 closed this Aug 8, 2014
@andrewor14 andrewor14 deleted the submit-driver-extra branch August 8, 2014 02:12
@SparkQA
Copy link

SparkQA commented Aug 8, 2014

QA results for PR 1770:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/18167/consoleFull

dongjoon-hyun pushed a commit that referenced this pull request Nov 18, 2023
### What changes were proposed in this pull request?
The pr aims to upgrade FasterXML jackson from 2.15.2 to 2.16.0.

### Why are the changes needed?
New version that fix some bugs, release notes as follows:
- 2.1.6.0 https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.16, eg:
[Databind](https://github.com/FasterXML/jackson-databind) [#1770](FasterXML/jackson-databind#1770): Incorrect deserialization for BigDecimal numbers
- 2.15.3 https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15.3, eg:
[Databind](https://github.com/FasterXML/jackson-databind) [#3968](FasterXML/jackson-databind#3968): Records with additional constructors failed to deserialize

The last upgrade occurred 6 months ago, #41414

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #43859 from panbingkun/SPARK-45967.

Authored-by: panbingkun <pbk1982@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants