sarutak commented on a change in pull request #30920:
URL: https://github.com/apache/spark/pull/30920#discussion_r548821803
##########
File path: core/src/main/resources/org/apache/spark/ui/static/executorspage.js
##########
@@ -414,38 +414,74 @@ $(document).ready(function () {
},
{
data: function (row, type) {
- if (type !== 'display')
- return row.peakMemoryMetrics.JVMHeapMemory;
- else
- return
(formatBytes(row.peakMemoryMetrics.JVMHeapMemory, type) + ' / ' +
-
formatBytes(row.peakMemoryMetrics.JVMOffHeapMemory, 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;
Review comment:
I think it's better to return `""` rather than `0` like done
[here](https://github.com/apache/spark/blob/master/core/src/main/resources/org/apache/spark/ui/static/stagepage.js#L482).
Could you update the similar logic in the previous PR too?
----------------------------------------------------------------
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]