Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ trait ClientBase extends Logging {

ClientBase.populateClasspath(yarnConf, sparkConf, log4jConfLocalRes != null, env)
env("SPARK_YARN_MODE") = "true"
env("SPARK_YARN_STAGING_DIR") = stagingDir
env("SPARK_YARN_STAGING_DIR") = FileSystem.get(conf).getHomeDirectory() + Path.SEPARATOR + stagingDir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this function already takes the stagingDir as a parameter and since we have to construct this now in 2 places (here and in prepareLocalResources) it would be better to pull this up higher and construct it once and pass it in.

env("SPARK_USER") = UserGroupInformation.getCurrentUser().getShortUserName()

// Set the environment variables to be passed on to the executors.
Expand Down