vanzin commented on a change in pull request #23720: [WIP]: create attributes
from live log urls to form a permalink past YARN log aggregation
URL: https://github.com/apache/spark/pull/23720#discussion_r262200594
##########
File path:
core/src/main/scala/org/apache/spark/deploy/history/HistoryAppStatusStore.scala
##########
@@ -63,8 +63,25 @@ private[spark] class HistoryAppStatusStore(
}
}
+ val STDOUT_URL_GROUPS = conf.get(LIVE_EXECUTOR_LOR_URL_CAPTURING_GROUPS)
+ .map(_.split(","))
+ .getOrElse(Array.empty[String])
+
+ val STDOUT_URL_REGEX = conf.get(LIVE_EXECUTOR_LOG_URL_REGEX)
+ .map(r => new Regex(r, STDOUT_URL_GROUPS: _*))
+
private def replaceLogUrls(exec: v1.ExecutorSummary, urlPattern: String):
v1.ExecutorSummary = {
- val attributes = exec.attributes
+ val attributes = STDOUT_URL_REGEX.flatMap { regEx =>
+ exec.executorLogs
+ .get("stdout")
+ .flatMap(regEx.findFirstMatchIn)
+ .map { urlMatch =>
+ STDOUT_URL_GROUPS.foldLeft(exec.attributes) { (attribs, groupName) =>
Review comment:
I don't think this block should be executed at all when `exec.attributes` is
not empty; IMO this should only apply to legacy event logs that don't record
that information.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]