Skip to content

Commit

Permalink
[SPARK-38175][CORE][FOLLOWUP] Remove urlPattern from `HistoryAppSta…
Browse files Browse the repository at this point in the history
…tusStore#replaceLogUrls` method signature

### What changes were proposed in this pull request?
This pr is a followup of SPARK-38175 to remove `urlPattern` from `HistoryAppStatusStore#replaceLogUrls` method signature

### Why are the changes needed?
Cleanup unused symbol.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GA

Closes #35567 from LuciferYang/SPARK-38175-FOLLOWUP.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
  • Loading branch information
LuciferYang authored and srowen committed Feb 19, 2022
1 parent 157dc7f commit 06f4ce4
Showing 1 changed file with 9 additions and 7 deletions.
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 = {
private def replaceLogUrls(exec: v1.ExecutorSummary): v1.ExecutorSummary = {
val newLogUrlMap = logUrlHandler.applyPattern(exec.executorLogs, exec.attributes)
replaceExecutorLogs(exec, newLogUrlMap)
}
Expand Down

0 comments on commit 06f4ce4

Please sign in to comment.