AngersZhuuuu commented on a change in pull request #28034: 
[SPARK-31268][CORE]Initial Task Executor Metrics with latestMetrics
URL: https://github.com/apache/spark/pull/28034#discussion_r408612064
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/executor/ExecutorMetricsPoller.scala
 ##########
 @@ -147,6 +147,10 @@ private[spark] class ExecutorMetricsPoller(
    * Called by TaskRunner#run.
    */
   def getTaskMetricPeaks(taskId: Long): Array[Long] = {
+    // If task running duration is less then pollInterval, task metric peak 
may not updated
+    // call poll() update to latest metrics
+    poll()
+
 
 Review comment:
   @jiangxb1987  poll() at here when task finish or error will get latest 
metrics peak.
   
   ExecutorMtericPoller.onTaskComplet() just remove taskId corresponding  entry 
in Map

----------------------------------------------------------------
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]


With regards,
Apache Git Services

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

Reply via email to