-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-3167] Handle special driver configs in Windows #2129
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
Conversation
Note that this is still currently broken. There is an issue with using SparkSubmitDriverBootstrapper with windows; the stdin is not being picked up properly by the SparkSubmit subprocess. This must be fixed before the PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working yet. See commit message andrewor14@83ebe60 for more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed in this commit andrewor14@f97daa2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JK, this was actually fixed in andrewor14@35caecc
|
QA tests have started for PR 2129 at commit
|
|
QA tests have finished for PR 2129 at commit
|
It turns out that java.lang.Process reads directly from the parent process' stdin on Windows. This means we should avoid spawning a thread that also attempts to redirect System.in to the subprocess (in vain) and contends with the subprocess in reading System.in. This raises an issue with knowing when to terminate the JVM in the PySpark shell, however, where Java itself is a python subprocess. We previously relied on the Java process killing itself on broken pipe, but this mechanism is not available on Windows since we no longer read from System.in for the EOF. Instead, in this environment we rely on python's shutdown hook to kill the child process.
Previously we only killed the surface-level "spark-submit.cmd" command. We need to go all the way and kill its children too.
|
Windows, test this please. |
This was simply missing in the existing code.
If you `set` a variable if a conditional, you have to use !VAR! instead of %VAR% after enabling delayed expansion. Don't ask.
|
QA tests have started for PR 2129 at commit
|
|
QA tests have finished for PR 2129 at commit
|
|
test this please |
|
QA tests have started for PR 2129 at commit
|
|
QA tests have finished for PR 2129 at commit
|
|
Hey Jenkins, test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The !VAR_NAME! syntax is explained here: andrewor14@72004c2. If we used %VAR_NAME%, this wouldn't pick up the latest value set in L76 because we're inside a conditional.
|
QA tests have started for PR 2129 at commit
|
|
-- Update -- As of the latest commit, I have tested this with setting the This is more or less ready from my side, though others should definitely review this. @JoshRosen It would be great if you can test this too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any public location where this behavior is specified (i.e. for a developer doc?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I'm aware of :/
|
Hey @andrewor14 - a few minor comments, but otherwise LGTM. At this point you are the foremost export on windows scripting, so can't add much value reviewing that. |
|
QA tests have finished for PR 2129 at commit
|
|
Jenkins, test this please |
|
QA tests have started for PR 2129 at commit
|
|
Okay I'm gonna merge this - thanks Andrew. |
This is an effort to bring the Windows scripts up to speed after recent splashing changes in apache#1845. Author: Andrew Or <[email protected]> Closes apache#2129 from andrewor14/windows-config and squashes the following commits: 881a8f0 [Andrew Or] Add reference to Windows taskkill 92e6047 [Andrew Or] Update a few comments (minor) 22b1acd [Andrew Or] Fix style again (minor) afcffea [Andrew Or] Fix style (minor) 72004c2 [Andrew Or] Actually respect --driver-java-options 803218b [Andrew Or] Actually respect SPARK_*_CLASSPATH eeb34a0 [Andrew Or] Update outdated comment (minor) 35caecc [Andrew Or] In Windows, actually kill Java processes on exit f97daa2 [Andrew Or] Fix Windows spark shell stdin issue 83ebe60 [Andrew Or] Parse special driver configs in Windows (broken) Conflicts: bin/spark-class2.cmd
|
QA tests have finished for PR 2129 at commit
|
This is an effort to bring the Windows scripts up to speed after recent splashing changes in apache#1845. Author: Andrew Or <[email protected]> Closes apache#2129 from andrewor14/windows-config and squashes the following commits: 881a8f0 [Andrew Or] Add reference to Windows taskkill 92e6047 [Andrew Or] Update a few comments (minor) 22b1acd [Andrew Or] Fix style again (minor) afcffea [Andrew Or] Fix style (minor) 72004c2 [Andrew Or] Actually respect --driver-java-options 803218b [Andrew Or] Actually respect SPARK_*_CLASSPATH eeb34a0 [Andrew Or] Update outdated comment (minor) 35caecc [Andrew Or] In Windows, actually kill Java processes on exit f97daa2 [Andrew Or] Fix Windows spark shell stdin issue 83ebe60 [Andrew Or] Parse special driver configs in Windows (broken)
This is an effort to bring the Windows scripts up to speed after recent splashing changes in #1845.