-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-22151] : PYTHONPATH not picked up from the spark.yarn.appMaste… #21468
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 1 commit
0aee8fa
5e733ae
6ba543e
5423bef
49f37a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- spark.executorEnv should not be overridden by appMasterEnv - Replacing ++ with ++=:
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -811,7 +811,7 @@ private[spark] class Client( | |
|
|
||
| // Finally, update the Spark config to propagate PYTHONPATH to the AM and executors. | ||
| if (pythonPath.nonEmpty) { | ||
| val pythonPathStr = (sys.env.get("PYTHONPATH") ++ pythonPath) | ||
| val pythonPathStr = (sys.env.get("PYTHONPATH") ++=: pythonPath) | ||
| .mkString(ApplicationConstants.CLASS_PATH_SEPARATOR) | ||
| val newValue = | ||
|
||
| if (env.contains("PYTHONPATH")) { | ||
|
|
@@ -820,7 +820,9 @@ private[spark] class Client( | |
| pythonPathStr | ||
| } | ||
| env("PYTHONPATH") = newValue | ||
| sparkConf.setExecutorEnv("PYTHONPATH", newValue) | ||
| if (!sparkConf.getExecutorEnv.toMap.contains("PYTHONPATH")) { | ||
|
||
| sparkConf.setExecutorEnv("PYTHONPATH", newValue) | ||
|
||
| } | ||
| } | ||
|
|
||
| if (isClusterMode) { | ||
|
|
||
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 modifying
pythonPath, but it's not used again after this line, so why?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.
Makes sense, have changed it to ++