You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Thomas Tauber-Marshall (Code Review)" <ge...@cloudera.org> on 2019/08/28 20:45:28 UTC

[Impala-ASF-CR] IMPALA-8897: Update debug webui to help with Apache Knox rewrite rules

Hello Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14151

to look at the new patch set (#3).

Change subject: IMPALA-8897: Update debug webui to help with Apache Knox rewrite rules
......................................................................

IMPALA-8897: Update debug webui to help with Apache Knox rewrite rules

This patch adds the 'host:port' to all links on the webserver. This
will facilitate proxying connections to the debug webui through Knox
by allowing us to create rewrite rules that do the transform:

<a href="scheme://host:port/path">...</a>
=>
<a href="<knox-host>/topology/impalaui/path?scheme-scheme&host=host&port=port">...</a>

which allows us to have a single IMPALAUI Knox service that can proxy
connections to any impalad/statestored/catalogd webui in a cluster.

Note that this works because currently all of the links on Impala's
webui are within the same webserver (it would also be possible to add
links to other Impala daemon webuis within a cluster, eg. if we wanted
to add webui links on the /backends page). If we ever need to add
links to external pages, the Knox service definition will likely need
to be modified.

This patch also adds hidden fields to all forms for the scheme, host,
and port value, so that GET requests from forms will result in the
same form as the transformed url shown above.

Testing:
- Ran the webserver and manually clicked around on a bunch of links to
  ensure everything works as expected.
- Ran in a cluster and verified the new Knox service defintion works
  as intended with this change.
- Added a test that uses a regex to check for template files that
  don't conform to the requirements.

Change-Id: If1195709a0f21f39d9a1e484880a0c46c9967ed2
---
M be/src/service/impala-beeswax-server.cc
M be/src/service/impala-hs2-server.cc
M be/src/util/webserver.cc
M be/src/util/webserver.h
M tests/common/file_utils.py
M tests/webserver/test_web_pages.py
M www/admission_controller.tmpl
M www/catalog.tmpl
M www/common-header.tmpl
A www/form-hidden-inputs.tmpl
M www/log_level.tmpl
M www/queries.tmpl
M www/query_detail_tabs.tmpl
M www/query_profile.tmpl
M www/sessions.tmpl
M www/threadz.tmpl
M www/threadz_tabs.tmpl
17 files changed, 116 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/51/14151/3
-- 
To view, visit http://gerrit.cloudera.org:8080/14151
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If1195709a0f21f39d9a1e484880a0c46c9967ed2
Gerrit-Change-Number: 14151
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Tauber-Marshall <tm...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>