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 @@ -243,7 +243,7 @@ private[yarn] class ExecutorRunnable(

// Add log urls
container.foreach { c =>
sys.env.filterKeys(_.endsWith("USER")).foreach { user =>
sys.env.get("SPARK_USER").orElse(sys.env.get("USER")).foreach { user =>
Copy link
Contributor

@HeartSaVioR HeartSaVioR Jan 26, 2019

Choose a reason for hiding this comment

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

So our preference would be SPARK_USER -> USER, right? I also have to apply this to #23260 given that I'm refactoring the this code block in #23260.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe explicitly set the SPARK_USER env variable to the value of Utils.getCurrentUserName? Instead of trying to figure out what's the correct value from the env. (USER could be wrong if you have kerberos, for example.)

val containerId = ConverterUtils.toString(c.getId)
val address = c.getNodeHttpAddress
val baseUrl = s"$httpScheme$address/node/containerlogs/$containerId/$user"
Expand Down