Skip to content

Commit

Permalink
[SPARK-20630][WEB UI] Fixed column visibility in Executor Tab
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

#14617 added new columns to the executor table causing the visibility checks for the logs and threadDump columns to toggle the wrong columns since they used hard-coded column numbers.

I've updated the checks to use column names instead of numbers so future updates don't accidentally break this again.

Note: This will also need to be back ported into 2.2 since #14617 was merged there

## How was this patch tested?

Manually tested

Author: Alex Bozarth <ajbozart@us.ibm.com>

Closes #17904 from ajbozarth/spark20630.

(cherry picked from commit ca4625e)
Signed-off-by: Sean Owen <sowen@cloudera.com>
  • Loading branch information
ajbozarth authored and srowen committed May 10, 2017
1 parent 3ed2f4d commit 7597a52
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,24 +492,20 @@ $(document).ready(function () {
{data: 'totalInputBytes', render: formatBytes},
{data: 'totalShuffleRead', render: formatBytes},
{data: 'totalShuffleWrite', render: formatBytes},
{data: 'executorLogs', render: formatLogsCells},
{name: 'executorLogsCol', data: 'executorLogs', render: formatLogsCells},
{
name: 'threadDumpCol',
data: 'id', render: function (data, type) {
return type === 'display' ? ("<a href='threadDump/?executorId=" + data + "'>Thread Dump</a>" ) : data;
}
}
],
"columnDefs": [
{
"targets": [ 16 ],
"visible": getThreadDumpEnabled()
}
],
"order": [[0, "asc"]]
};

var dt = $(selector).DataTable(conf);
dt.column(15).visible(logsExist(response));
dt.column('executorLogsCol:name').visible(logsExist(response));
dt.column('threadDumpCol:name').visible(getThreadDumpEnabled());
$('#active-executors [data-toggle="tooltip"]').tooltip();

var sumSelector = "#summary-execs-table";
Expand Down

0 comments on commit 7597a52

Please sign in to comment.