Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-38175][CORE][FOLLOWUP] Remove urlPattern from HistoryAppStatusStore#replaceLogUrls method signature #35567

Closed
wants to merge 3 commits into from
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