[GitHub] [spark] imback82 commented on a change in pull request #29020: [SPARK-23431][CORE] Expose stage level peak executor metrics via REST API

2020-07-24 Thread GitBox


imback82 commented on a change in pull request #29020:
URL: https://github.com/apache/spark/pull/29020#discussion_r460351674



##
File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
##
@@ -868,13 +868,17 @@ private[spark] class AppStatusListener(
 // check if there is a new peak value for any of the executor level memory 
metrics
 // for the live UI. SparkListenerExecutorMetricsUpdate events are only 
processed
 // for the live UI.
-event.executorUpdates.foreach { case (_, peakUpdates) =>
+event.executorUpdates.foreach { case (key, peakUpdates) =>
   liveExecutors.get(event.execId).foreach { exec =>
 if (exec.peakExecutorMetrics.compareAndUpdatePeakValues(peakUpdates)) {
   maybeUpdate(exec, now)

Review comment:
   We need `update` here since we know that new peak values are received 
(by checking `compareAndUpdatePeakValues`). If we use `maybeUpdate`, we may 
miss recording these new peak values.





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



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



[GitHub] [spark] imback82 commented on a change in pull request #29020: [SPARK-23431][CORE] Expose stage level peak executor metrics via REST API

2020-07-16 Thread GitBox


imback82 commented on a change in pull request #29020:
URL: https://github.com/apache/spark/pull/29020#discussion_r456197496



##
File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
##
@@ -868,13 +868,17 @@ private[spark] class AppStatusListener(
 // check if there is a new peak value for any of the executor level memory 
metrics
 // for the live UI. SparkListenerExecutorMetricsUpdate events are only 
processed
 // for the live UI.
-event.executorUpdates.foreach { case (_, peakUpdates) =>
+event.executorUpdates.foreach { case (key, peakUpdates) =>
   liveExecutors.get(event.execId).foreach { exec =>
 if (exec.peakExecutorMetrics.compareAndUpdatePeakValues(peakUpdates)) {
   maybeUpdate(exec, now)

Review comment:
   You are right. Changed it to `update`. Thanks.

##
File path: 
core/src/test/resources/HistoryServerExpectations/minDate_app_list_json_expectation.json
##
@@ -9,27 +24,25 @@
 "sparkUser" : "tgraves",
 "completed" : true,
 "appSparkVersion" : "3.0.0-SNAPSHOT",
+"lastUpdatedEpoch" : 0,
 "endTimeEpoch" : 1578764802615,
-"startTimeEpoch" : 1578764662851,
-"lastUpdatedEpoch" : 0
+"startTimeEpoch" : 1578764662851

Review comment:
   This is auto-generated when I ran `HistoryServerSuite.main`. I now 
changed to preserve the ordering to minimize the changes.





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



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