[SPARK-14232][WEBUI] Fix event timeline display issue when an executor is removed with a multiple line reason.
## What changes were proposed in this pull request? The event timeline doesn't show on job page if an executor is removed with a multiple line reason. This PR replaces all new line characters in the reason string with spaces. ![timelineerror](https://cloud.githubusercontent.com/assets/9278199/14100211/5fd4cd30-f5be-11e5-9cea-f32651a4cd62.jpg) ## How was this patch tested? Verified on the Web UI. Author: Carson Wang <carson.wang@intel.com> Closes #12029 from carsonwang/eventTimeline.
This commit is contained in:
parent
d2a819a636
commit
15c0b0006b
|
@ -148,7 +148,7 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
|
|||
| 'Removed at ${UIUtils.formatDate(new Date(event.finishTime.get))}' +
|
||||
| '${
|
||||
if (event.finishReason.isDefined) {
|
||||
s"""<br>Reason: ${event.finishReason.get}"""
|
||||
s"""<br>Reason: ${event.finishReason.get.replace("\n", " ")}"""
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ private[ui] class JobPage(parent: JobsTab) extends WebUIPage("job") {
|
|||
| 'Removed at ${UIUtils.formatDate(new Date(event.finishTime.get))}' +
|
||||
| '${
|
||||
if (event.finishReason.isDefined) {
|
||||
s"""<br>Reason: ${event.finishReason.get}"""
|
||||
s"""<br>Reason: ${event.finishReason.get.replace("\n", " ")}"""
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue