gengliangwang opened a new pull request #25369: [SPARK-28638][WebUI] Task 
summary metrics are wrong when there are running tasks
URL: https://github.com/apache/spark/pull/25369
 
 
   ## What changes were proposed in this pull request?
   
   Currently, on requesting summary metrics, cached data are returned if the 
current number of "SUCCESS" tasks is the same as the value in cached data.
   However, the number of "SUCCESS" tasks is wrong when there are running 
tasks. In `AppStatusStore`, the KVStore is `ElementTrackingStore`, instead of 
`InMemoryStore`. The value count is always the number of "SUCCESS" tasks + 
"RUNNING" tasks.
   Thus, even when the running tasks are finished, the out-of-update cached 
data is returned.
   
   This PR is to fix the code in getting the number of "SUCCESS" tasks.
   
   ## How was this patch tested?
   
   Test manually, run 
   ```
   sc.parallelize(1 to 160, 40).map(i => Thread.sleep(i*100)).collect()
   ```
   and keep refreshing the stage page , we can see the task summary metrics is 
wrong.
   
   Before fix:
   
![image](https://user-images.githubusercontent.com/1097932/62560343-6a141780-b8af-11e9-8942-d88540659a93.png)
   
   After fix:
   
![image](https://user-images.githubusercontent.com/1097932/62560355-7009f880-b8af-11e9-8ba8-10c083a48d7b.png)
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to