You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by wz...@apache.org on 2022/05/10 23:27:40 UTC

[impala] 02/02: IMPALA-11248: Fix infinite warning dialog issue when datatable cells have undefined values in www/rpcz web page

This is an automated email from the ASF dual-hosted git repository.

wzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 2abcf31949ecdda95bf60e0ef463bdc168b53bf1
Author: carolinchen <ca...@tencent.com>
AuthorDate: Wed Apr 27 10:58:14 2022 +0800

    IMPALA-11248: Fix infinite warning dialog issue when datatable cells have undefined values in www/rpcz web page
    
    This patch fixes datatables script show warning dialog repeatedly in
    some kernel environment, we find the issue in centOS linux release 7.2
    and tencent tlinux release 2.2. If the javascript without initial value
    set, then the front-end page prompts that the variable is not defined,
    which cause the datatables script to repeatedly show warning dialog
    pop up with message such as follow:
    
    DataTables warning: table id=inbound_per_conn_metrics - Requested
    unknown parameter '6' for row 0, column 6.
    For more information about this error, please see
    http://datatables.net/tn/4
    
    Testing:
    - Ran Q4 of TPC-DS against tpcds_parquet table manually. Verified that
    the page display the KRPC inbound/outbound connections table properly
    without any warning dialog and auto-refresh normally.
    - Ran exhaustive tests with the patch.
    
    Change-Id: I7f284b4419ba7dd72baa960dcd5700da22dccdff
    Reviewed-on: http://gerrit.cloudera.org:8080/18452
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 www/rpcz.tmpl | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/www/rpcz.tmpl b/www/rpcz.tmpl
index cbe704f06..f2e2e19e2 100644
--- a/www/rpcz.tmpl
+++ b/www/rpcz.tmpl
@@ -298,18 +298,18 @@ function update_krpc_conn_metrics_datatable(json) {
   var table = $('#per_conn_metrics').DataTable();
   var rows = $.map(json["per_conn_metrics"], function(row) {
     return [[row["remote_ip"], row["num_calls_in_flight"], row["outbound_queue_size"],
-             row["socket_stats"]["rtt"],
-             row["socket_stats"]["rttvar"],
-             row["socket_stats"]["snd_cwnd"],
-             row["socket_stats"]["total_retrans"],
-             row["socket_stats"]["pacing_rate"],
-             row["socket_stats"]["max_pacing_rate"],
-             row["socket_stats"]["bytes_acked"],
-             row["socket_stats"]["bytes_received"],
-             row["socket_stats"]["segs_out"],
-             row["socket_stats"]["segs_in"],
-             row["socket_stats"]["send_queue_bytes"],
-             row["socket_stats"]["receive_queue_bytes"]]];
+             row["socket_stats"]["rtt"] ?? '',
+             row["socket_stats"]["rttvar"] ?? '',
+             row["socket_stats"]["snd_cwnd"] ?? '',
+             row["socket_stats"]["total_retrans"] ?? '',
+             row["socket_stats"]["pacing_rate"] ?? '',
+             row["socket_stats"]["max_pacing_rate"] ?? '',
+             row["socket_stats"]["bytes_acked"] ?? '',
+             row["socket_stats"]["bytes_received"] ?? '',
+             row["socket_stats"]["segs_out"] ?? '',
+             row["socket_stats"]["segs_in"] ?? '',
+             row["socket_stats"]["send_queue_bytes"] ?? '',
+             row["socket_stats"]["receive_queue_bytes"] ?? '']];
   });
 
   table.clear().rows.add(rows).draw();
@@ -319,18 +319,18 @@ function update_krpc_inbound_conn_metrics_datatable(json) {
   var table = $('#inbound_per_conn_metrics').DataTable();
   var rows = $.map(json["inbound_per_conn_metrics"], function(row) {
     return [[row["remote_ip"], row["num_calls_in_flight"],
-             row["socket_stats"]["rtt"],
-             row["socket_stats"]["rttvar"],
-             row["socket_stats"]["snd_cwnd"],
-             row["socket_stats"]["total_retrans"],
-             row["socket_stats"]["pacing_rate"],
-             row["socket_stats"]["max_pacing_rate"],
-             row["socket_stats"]["bytes_acked"],
-             row["socket_stats"]["bytes_received"],
-             row["socket_stats"]["segs_out"],
-             row["socket_stats"]["segs_in"],
-             row["socket_stats"]["send_queue_bytes"],
-             row["socket_stats"]["receive_queue_bytes"]]];
+             row["socket_stats"]["rtt"] ?? '',
+             row["socket_stats"]["rttvar"] ?? '',
+             row["socket_stats"]["snd_cwnd"] ?? '',
+             row["socket_stats"]["total_retrans"] ?? '',
+             row["socket_stats"]["pacing_rate"] ?? '',
+             row["socket_stats"]["max_pacing_rate"] ?? '',
+             row["socket_stats"]["bytes_acked"] ?? '',
+             row["socket_stats"]["bytes_received"] ?? '',
+             row["socket_stats"]["segs_out"] ?? '',
+             row["socket_stats"]["segs_in"] ?? '',
+             row["socket_stats"]["send_queue_bytes"] ?? '',
+             row["socket_stats"]["receive_queue_bytes"] ?? '']];
   });
 
   table.clear().rows.add(rows).draw();