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 @@ -44,21 +44,23 @@ private[spark] class HistoryAppStatusStore(

override def executorList(activeOnly: Boolean): Seq[v1.ExecutorSummary] = {
val execList = super.executorList(activeOnly)
logUrlPattern match {
case Some(pattern) => execList.map(replaceLogUrls(_, pattern))
case None => execList
if (logUrlPattern.nonEmpty) {
execList.map(replaceLogUrls)
} else {
execList
}
}

override def executorSummary(executorId: String): v1.ExecutorSummary = {
val execSummary = super.executorSummary(executorId)
logUrlPattern match {
case Some(pattern) => replaceLogUrls(execSummary, pattern)
case None => execSummary
if (logUrlPattern.nonEmpty) {
replaceLogUrls(execSummary)
} else {
execSummary
}
}

private def replaceLogUrls(exec: v1.ExecutorSummary, urlPattern: String): v1.ExecutorSummary = {
Copy link
Contributor Author

@LuciferYang LuciferYang Feb 18, 2022

Choose a reason for hiding this comment

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

SPARK-26311 defines this method with urlPattern and SPARK-26792 change to use logUrlPattern held by ExecutorLogUrlHandler

private def replaceLogUrls(exec: v1.ExecutorSummary): v1.ExecutorSummary = {
val newLogUrlMap = logUrlHandler.applyPattern(exec.executorLogs, exec.attributes)
replaceExecutorLogs(exec, newLogUrlMap)
}
Expand Down