Skip to content

Commit ab78b1d

Browse files
author
Marcelo Vanzin
committed
[SPARK-9388] [YARN] Make executor info log messages easier to read.
Author: Marcelo Vanzin <[email protected]> Closes #7706 from vanzin/SPARK-9388 and squashes the following commits: 028b990 [Marcelo Vanzin] Single log statement. 3c5fb6a [Marcelo Vanzin] YARN not Yarn. 5bcd7a0 [Marcelo Vanzin] [SPARK-9388] [yarn] Make executor info log messages easier to read.
1 parent e535346 commit ab78b1d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ private[spark] class Client(
767767
amContainer.setCommands(printableCommands)
768768

769769
logDebug("===============================================================================")
770-
logDebug("Yarn AM launch context:")
770+
logDebug("YARN AM launch context:")
771771
logDebug(s" user class: ${Option(args.userClass).getOrElse("N/A")}")
772772
logDebug(" env:")
773773
launchEnv.foreach { case (k, v) => logDebug(s" $k -> $v") }

yarn/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnable.scala

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,17 @@ class ExecutorRunnable(
8686
val commands = prepareCommand(masterAddress, slaveId, hostname, executorMemory, executorCores,
8787
appId, localResources)
8888

89-
logInfo(s"Setting up executor with environment: $env")
90-
logInfo("Setting up executor with commands: " + commands)
91-
ctx.setCommands(commands)
89+
logInfo(s"""
90+
|===============================================================================
91+
|YARN executor launch context:
92+
| env:
93+
|${env.map { case (k, v) => s" $k -> $v\n" }.mkString}
94+
| command:
95+
| ${commands.mkString(" ")}
96+
|===============================================================================
97+
""".stripMargin)
9298

99+
ctx.setCommands(commands)
93100
ctx.setApplicationACLs(YarnSparkHadoopUtil.getApplicationAclsForYarn(securityMgr))
94101

95102
// If external shuffle service is enabled, register with the Yarn shuffle service already

0 commit comments

Comments
 (0)