gengliangwang commented on a change in pull request #30920:
URL: https://github.com/apache/spark/pull/30920#discussion_r549348678



##########
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:
       Actually in 
https://github.com/apache/spark/blob/master/core/src/main/resources/org/apache/spark/ui/static/stagepage.js#L501,
 it also returns 0.
   If the column is invisible, it seems fine to return anything.




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

Reply via email to