sarutak commented on a change in pull request #30573:
URL: https://github.com/apache/spark/pull/30573#discussion_r537270857
##########
File path: core/src/main/resources/org/apache/spark/ui/static/stagepage.js
##########
@@ -463,15 +486,95 @@ $(document).ready(function () {
data : function (row, type) {
return typeof row.diskBytesSpilled !=
'undefined' ? formatBytes(row.diskBytesSpilled, type) : "";
}
+ },
+ {
+ data : function (row, type) {
+ var peakMemoryMetrics = row.peakMemoryMetrics
Review comment:
nit: Please put `;` at the end of the statement here and other similar
places.
##########
File path: core/src/main/resources/org/apache/spark/ui/static/stagepage.js
##########
@@ -463,15 +486,95 @@ $(document).ready(function () {
data : function (row, type) {
return typeof row.diskBytesSpilled !=
'undefined' ? formatBytes(row.diskBytesSpilled, type) : "";
}
+ },
+ {
+ data : function (row, type) {
+ var peakMemoryMetrics = row.peakMemoryMetrics
+ if (typeof peakMemoryMetrics !== 'undefined') {
+ if (type !== 'display')
+ return peakMemoryMetrics.JVMHeapMemory;
+ else
+ return
(formatBytes(peakMemoryMetrics.JVMHeapMemory, type) + ' / ' +
+
formatBytes(peakMemoryMetrics.JVMOffHeapMemory, type));
+ } else {
+ if (type !== 'display') {
+ return 0;
+ } else {
+ return '0.0 B / 0.0 B';
+ }
+ }
+
+ }
+ },
+ {
+ data : function (row, type) {
+ var peakMemoryMetrics = row.peakMemoryMetrics
+ if (typeof peakMemoryMetrics !== 'undefined')
{
+ if (type !== 'display')
+ return
peakMemoryMetrics.OnHeapExecutionMemory;
+ else
+ return
(formatBytes(peakMemoryMetrics.OnHeapExecutionMemory, type) + ' / ' +
+
formatBytes(peakMemoryMetrics.OffHeapExecutionMemory, type));
+ } else {
+ if (type !== 'display') {
+ return 0;
+ } else {
+ return '0.0 B / 0.0 B';
+ }
+ }
+ }
+ },
+ {
+ data : function (row, type) {
+ var peakMemoryMetrics = row.peakMemoryMetrics
+ if (typeof peakMemoryMetrics !== 'undefined') {
+ if (type !== 'display')
+ return
peakMemoryMetrics.OnHeapStorageMemory;
+ else
+ return
(formatBytes(peakMemoryMetrics.OnHeapStorageMemory, type) + ' / ' +
+
formatBytes(row.peakMemoryMetrics.OffHeapStorageMemory, type));
Review comment:
`row.peakMemoryMetrics.OffHeapStorageMemory` ->
`peakMemoryMetrics.OffHeapStorageMemory`.
##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
##########
@@ -687,6 +687,9 @@ private[spark] class AppStatusListener(
stage.killedSummary = killedTasksSummary(event.reason,
stage.killedSummary)
}
stage.activeTasksPerExecutor(event.taskInfo.executorId) -= 1
+
+ stage.executorSummary(event.taskInfo.executorId).peakExecutorMetrics
+ .compareAndUpdatePeakValues(event.taskExecutorMetrics)
Review comment:
Hmm... executor metrics for each stage should be collected
[here](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/status/AppStatusListener.scala#L980).
But if the heartbeat interval from an executor is longer than lifetime of a
stage, we can't collect the executor metrics.
So this change can be one option. What do you think @gengliangwang ?
----------------------------------------------------------------
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]