File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -811,7 +811,7 @@ private[spark] class Client(
811811
812812 // Finally, update the Spark config to propagate PYTHONPATH to the AM and executors.
813813 if (pythonPath.nonEmpty) {
814- val pythonPathStr = (sys.env.get(" PYTHONPATH" ) ++ pythonPath)
814+ val pythonPathStr = (sys.env.get(" PYTHONPATH" ) ++=: pythonPath)
815815 .mkString(ApplicationConstants .CLASS_PATH_SEPARATOR )
816816 val newValue =
817817 if (env.contains(" PYTHONPATH" )) {
@@ -820,7 +820,9 @@ private[spark] class Client(
820820 pythonPathStr
821821 }
822822 env(" PYTHONPATH" ) = newValue
823- sparkConf.setExecutorEnv(" PYTHONPATH" , newValue)
823+ if (! sparkConf.getExecutorEnv.toMap.contains(" PYTHONPATH" )) {
824+ sparkConf.setExecutorEnv(" PYTHONPATH" , newValue)
825+ }
824826 }
825827
826828 if (isClusterMode) {
You can’t perform that action at this time.
0 commit comments