Skip to content
Closed
Changes from 2 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 @@ -45,20 +45,21 @@ 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 Some(_) => execList.map(replaceLogUrls)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, let me fix this too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

case None => 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 = {

@LuciferYang LuciferYang Feb 18, 2022

Copy link
Copy Markdown
Contributor Author

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