-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24428][K8S] Fix unused code #21462
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
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.
In general I would like to refactor the name here of SPARK_JAVA_OPTS, its a bit misleading as this property used to exist in Spark and was removed: https://issues.apache.org/jira/browse/SPARK-14453
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.
it would be confusing -- this is local though right, not exported?
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.
@felixcheung yes it is local, but for users not to make assumptions it would be good to rename it at some point.
|
Test build #91305 has finished for PR 21462 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
@foxish pls review. |
|
jenkins, ok to test |
|
Test build #91312 has finished for PR 21462 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
docs/running-on-kubernetes.md
Outdated
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.
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.
We should confirm that the new init-container-less implementation retains the capability of doing that - maybe through an e2e test.
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.
@foxish I can add that capability, but as far as I can tell this is not there now. I was looking for that but SPARK_EXTRA_CLASSPATH I am afraid is not used. In addition since we are using client mode --driver-class-path should be used here. In general all options in the common config doc should we functional.
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.
Should be able to specify dependencies with the URI local://. However in order for the image itself to specify additional jars without having to list them in spark-submit, you have to put the jars in the same directory as the rest of the Spark distribution jars. It would be good to have an API or environment variable that can point to additional jars.
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.
@mccheah yes putting under /opt/spark/jars is one option because its included by default in the classpath. I will add then SPARK_EXTRA_CLASSPATH back and will let the jars there added to the spark-submit in the container, sounds good?
I opened another ticker for the driver's extra java options here.
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.
It does not create any side effects so it can be removed.
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.
Do we not have secrets -> mountpaths support right now? @mccheah @liyinan926
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.
@foxish you are right we do have, but this statement has no effect. For example ti does not modify sparkConf.
It was used in the past by the following statement that was removed:
- val mountSecretBootstrap = if (executorSecretNamesToMountPaths.nonEmpty) {
- Some(new MountSecretsBootstrap(executorSecretNamesToMountPaths))
- } else {
- None
- }
Here is the relevant PR:
a83ae0d#diff-7d9979c0153744eafa24348ecbfa1671
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.
@mccheah @liyinan926 any more to this?
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 might be a bug, shouldn't we just be mounting the secrets here?
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.
@mccheah @felixcheung I think the logic has changed otherwise the tests I have in this PR(#21652) would have failed when removed that part and re-run them. Also they should have failed anyway if there was a bug. Tests there cover mounted secrets.
|
Test build #91560 has finished for PR 21462 at commit
|
|
@foxish pls review. It is quite short :) |
| cp -R "$SPARK_MOUNTED_FILES_DIR/." . | ||
| readarray -t SPARK_EXECUTOR_JAVA_OPTS < /tmp/java_opts.txt | ||
|
|
||
| if [ -n "$SPARK_EXTRA_CLASSPATH" ]; then |
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 var exists in docs but not in code.
| fi | ||
| if [ -n "$SPARK_MOUNTED_FILES_DIR" ]; then | ||
| cp -R "$SPARK_MOUNTED_FILES_DIR/." . | ||
| readarray -t SPARK_EXECUTOR_JAVA_OPTS < /tmp/java_opts.txt |
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.
Rename for historical reasons.
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 local right? shouldn't matter what the name is. also this might be an image running the driver, not an executor?
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.
@felixcheung I believe this is because we are running spark-submit from driver. And so the JAVA_OPTS are now only applicable to the executor.
I +1 this change, but would like weigh-in from @foxish
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.
Yeah spark-submit detects whatever it needs via the spark-launcher.
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.
+1, that makes sense. Those env-vars are set by launcher at submission time.
|
Test build #91562 has finished for PR 21462 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
@felixcheung @mccheah pls review. |
|
@foxish gentle ping. |
|
@felixcheung gentle ping. |
felixcheung
left a comment
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.
I think ok, but someone else should review entrypoint.sh
| fi | ||
| if [ -n "$SPARK_MOUNTED_FILES_DIR" ]; then | ||
| cp -R "$SPARK_MOUNTED_FILES_DIR/." . | ||
| readarray -t SPARK_EXECUTOR_JAVA_OPTS < /tmp/java_opts.txt |
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 local right? shouldn't matter what the name is. also this might be an image running the driver, not an executor?
|
@felixcheung its local. |
|
@foxish gentle ping. |
foxish
left a comment
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.
Just a couple of questions.
Change LGTM, thanks.
| fi | ||
| if [ -n "$SPARK_MOUNTED_FILES_DIR" ]; then | ||
| cp -R "$SPARK_MOUNTED_FILES_DIR/." . | ||
| readarray -t SPARK_EXECUTOR_JAVA_OPTS < /tmp/java_opts.txt |
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.
+1, that makes sense. Those env-vars are set by launcher at submission time.
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.
Do we not have secrets -> mountpaths support right now? @mccheah @liyinan926
|
Thank you @foxish I was also thinking of adding the following: I have already tested it with: org.apache.spark.examples.DFSReadWriteTest |
|
@skonto can we hold off on that until I merge Kerberos support? It is in the works :) |
|
@foxish @felixcheung gentle ping for merge. I replied for mount paths. |
|
ping @mccheah @liyinan926 on #21462 (comment) |
|
LGTM, we can file a separate task to track what happened to secrets mounting without blocking on removing dead code. Thanks for the fix @skonto. |
|
Merging to master |
What changes were proposed in this pull request?
Remove code that is misleading and is a leftover from a previous implementation.
How was this patch tested?
Manually.