You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/28 13:30:24 UTC
[GitHub] [spark] gengliangwang commented on a change in pull request #30920: [SPARK-33906][WEBUI] Fix the bug of UI Executor page stuck due to undefined peakMemoryMetrics
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org