Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-33204][UI] The 'Event Timeline' area cannot be opened when a s…
…park application has some failed jobs ### What changes were proposed in this pull request? The page returned by /jobs in Spark UI will store the detail information of each job in javascript like this: ```javascript { 'className': 'executor added', 'group': 'executors', 'start': new Date(1602834008978), 'content': '<div class="executor-event-content"' + 'data-toggle="tooltip" data-placement="top"' + 'data-title="Executor 3<br>' + 'Added at 2020/10/16 15:40:08"' + 'data-html="true">Executor 3 added</div>' } ``` if an application has a failed job, the failure reason corresponding to the job will be stored in the ` content` field in the javascript . if the failure reason contains the character: **'**, the javascript code will throw an exception to cause the `event timeline url` had no response , The following is an example of error json: ```javascript { 'className': 'executor removed', 'group': 'executors', 'start': new Date(1602925908654), 'content': '<div class="executor-event-content"' + 'data-toggle="tooltip" data-placement="top"' + 'data-title="Executor 2<br>' + 'Removed at 2020/10/17 17:11:48' + '<br>Reason: Container from a bad node: ... 20/10/17 16:00:42 WARN ShutdownHookManager: ShutdownHook **'$anon$2'** timeout..."' + 'data-html="true">Executor 2 removed</div>' } ``` So we need to considier this special case , if the returned job info contains the character:**'**, just remove it ### Why are the changes needed? Ensure that the UI page can function normally ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? This pr only fixes an exception in a special case, manual test result as blows: ![fixed](https://user-images.githubusercontent.com/52202080/96711638-74490580-13d0-11eb-93e0-b44d9ed5da5c.gif) Closes #30119 from akiyamaneko/timeline_view_cannot_open. Authored-by: neko <echohlne@gmail.com> Signed-off-by: Gengliang Wang <gengliang.wang@databricks.com>
- Loading branch information