Ngone51 commented on a change in pull request #29644:
URL: https://github.com/apache/spark/pull/29644#discussion_r492773051
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/cluster/StandaloneSchedulerBackend.scala
##########
@@ -231,6 +232,17 @@ private[spark] class StandaloneSchedulerBackend(
}
}
+ override def getDriverLogUrls: Option[Map[String, String]] = {
+ sys.env.get("SPARK_DRIVER_LOG_URL_STDOUT") match {
+ case Some(_) =>
+ val prefix = "SPARK_DRIVER_LOG_URL_"
+ Some(sys.env.filterKeys(_.startsWith(prefix))
+ .map(e => (e._1.substring(prefix.length).toLowerCase(Locale.ROOT),
e._2)).toMap)
+ case None => // client mode
+ None
+ }
Review comment:
How about:
```suggestion
val prefix = "SPARK_DRIVER_LOG_URL_"
val logUrls = sys.env.filterKeys(_.startsWith(prefix))
.map(e => (e._1.substring(prefix.length).toLowerCase(Locale.ROOT),
e._2)).toMap
if (logUrls.nonEmpty) Some(logUrls) else None
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]