akiyamaneko opened a new pull request #30119:
URL: https://github.com/apache/spark/pull/30119


   ### 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)
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to