-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,12 +45,10 @@ shift 1 | |
|
|
||
| SPARK_CLASSPATH="$SPARK_CLASSPATH:${SPARK_HOME}/jars/*" | ||
| env | grep SPARK_JAVA_OPT_ | sort -t_ -k4 -n | sed 's/[^=]*=\(.*\)/\1/g' > /tmp/java_opts.txt | ||
| readarray -t SPARK_JAVA_OPTS < /tmp/java_opts.txt | ||
| if [ -n "$SPARK_MOUNTED_CLASSPATH" ]; then | ||
| SPARK_CLASSPATH="$SPARK_CLASSPATH:$SPARK_MOUNTED_CLASSPATH" | ||
| fi | ||
| if [ -n "$SPARK_MOUNTED_FILES_DIR" ]; then | ||
| cp -R "$SPARK_MOUNTED_FILES_DIR/." . | ||
| readarray -t SPARK_EXECUTOR_JAVA_OPTS < /tmp/java_opts.txt | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename for historical reasons.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah spark-submit detects whatever it needs via the spark-launcher.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| if [ -n "$SPARK_EXTRA_CLASSPATH" ]; then | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This var exists in docs but not in code. |
||
| SPARK_CLASSPATH="$SPARK_CLASSPATH:$SPARK_EXTRA_CLASSPATH" | ||
| fi | ||
|
|
||
| case "$SPARK_K8S_CMD" in | ||
|
|
@@ -66,7 +64,7 @@ case "$SPARK_K8S_CMD" in | |
| executor) | ||
| CMD=( | ||
| ${JAVA_HOME}/bin/java | ||
| "${SPARK_JAVA_OPTS[@]}" | ||
| "${SPARK_EXECUTOR_JAVA_OPTS[@]}" | ||
| -Xms$SPARK_EXECUTOR_MEMORY | ||
| -Xmx$SPARK_EXECUTOR_MEMORY | ||
| -cp "$SPARK_CLASSPATH" | ||
|
|
||
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
Uh oh!
There was an error while loading. Please reload this page.
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:
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?
Uh oh!
There was an error while loading. Please reload this page.
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.