Files
impala/www/backends.tmpl
Thomas Tauber-Marshall 014f973e92 IMPALA-9243: Add info about blacklisting decisions to the webui
This patch adds information about blacklisting decisions to the
/backends webui endpoint.

For the JSON, it adds an 'is_blacklisted' field to all backends, and
for and backends where 'is_blacklisted' is true it adds a
'blacklist_cause' field indicating the error status that led to the
backend getting blacklisted and an 'blacklist_time_remaining' field
indiciating how much longer the backend will remain on the blacklist.
It also adds counts for the number of blacklisted and quiescing
backends, if any, and the number of active (i.e. all other) backends.

For display, in order to prevent the table of backend information from
having too many columns (prior to this patch it already had 12), it
separates blacklisted, quiescing, and active backends into three
separate table, with the blacklisted and quiescing tables only getting
displayed if there are any such backends.

Additionally, tooltips are added next to the headers for the
blacklisted and quiescing tables that provide a brief explanation of
what it means for a backend to appear on there lists.

Using separate tables also facilitates having state-specific columns -
the blacklisted table displays columns for the blacklist cause and
time remaining. Future work could consider adding columns to the
quiescing table, such as time until the grace period and deadline
expires.

Testing:
- Manually ran various quiescing/blacklisting scenarios and confirmed
  the /backends page displays as expected.
- Added cases to test_web_pages (to verify the new fields when nothing
  is blacklisted) and test_blacklist.

Change-Id: Ia0c309315b142a50be102dcb516b36ec6cb3cf47
Reviewed-on: http://gerrit.cloudera.org:8080/15178
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2020-02-08 05:22:48 +00:00

168 lines
5.0 KiB
Cheetah

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
{{> www/common-header.tmpl }}
<h2>Active backend(s): {{num_active_backends}}</h2>
<table id="backends" class='table table-hover table-bordered'>
<thead>
<tr>
<th></th>
<th>Address</th>
<th>Krpc Address</th>
<th>Coordinator</th>
<th>Executor</th>
<th>Memory Limit for Admission</th>
<th>Memory Reserved</th>
<th>Memory Admitted by Queries Submitted to this Coordinator</th>
<th>Admission Control Slots In Use</th>
<th>Num. Queries Admitted by this Coordinator</th>
<th>Executor Groups</th>
</tr>
</thead>
<tbody>
{{#backends}}
{{?is_active}}
<tr>
<td><a href='{{webserver_url}}'>Web UI</a></td>
<td>{{address}}</td>
<td>{{krpc_address}}</td>
<td>{{is_coordinator}}</td>
<td>{{is_executor}}</td>
<td>{{admit_mem_limit}}</td>
<td>{{mem_reserved}}</td>
<td>{{mem_admitted}}</td>
<td>{{admission_slots_in_use}}/{{admission_slots}}</td>
<td>{{num_admitted}}</td>
<td>{{executor_groups}}</td>
</tr>
{{/is_active}}
{{/backends}}
</tbody>
</table>
{{#num_quiescing_backends}}
<h2>Quiescing backend(s)<sup><a href='#' data-toggle="tooltip" title="{{> www/quiescing_tooltip.txt }}">[?]</a></sup>: {{num_quiescing_backends}}</h2>
<table id="quiescing_backends" class='table table-hover table-bordered'>
<thead>
<tr>
<th></th>
<th>Address</th>
<th>Krpc Address</th>
<th>Coordinator</th>
<th>Executor</th>
<th>Memory Limit for Admission</th>
<th>Memory Reserved</th>
<th>Memory Admitted by Queries Submitted to this Coordinator</th>
<th>Admission Control Slots In Use</th>
<th>Num. Queries Admitted by this Coordinator</th>
<th>Executor Groups</th>
</tr>
</thead>
<tbody>
{{#backends}}
{{?is_quiescing}}
<tr>
<td><a href='{{webserver_url}}'>Web UI</a></td>
<td>{{address}}</td>
<td>{{krpc_address}}</td>
<td>{{is_coordinator}}</td>
<td>{{is_executor}}</td>
<td>{{admit_mem_limit}}</td>
<td>{{mem_reserved}}</td>
<td>{{mem_admitted}}</td>
<td>{{admission_slots_in_use}}/{{admission_slots}}</td>
<td>{{num_admitted}}</td>
<td>{{executor_groups}}</td>
</tr>
{{/is_quiescing}}
{{/backends}}
</tbody>
</table>
{{/num_quiescing_backends}}
{{#num_blacklisted_backends}}
<h2>Blacklisted backend(s)<sup><a href='#' data-toggle="tooltip" title="{{> www/blacklisted_tooltip.txt }}">[?]</a></sup>: {{num_blacklisted_backends}}</h2>
<table id="blacklisted_backends" class='table table-hover table-bordered'>
<thead>
<tr>
<th></th>
<th>Address</th>
<th>Krpc Address</th>
<th>Blacklisting Cause</th>
<th>Time remaining on blacklist</th>
<th>Coordinator</th>
<th>Executor</th>
<th>Memory Limit for Admission</th>
<th>Memory Reserved</th>
<th>Memory Admitted by Queries Submitted to this Coordinator</th>
<th>Admission Control Slots In Use</th>
<th>Num. Queries Admitted by this Coordinator</th>
<th>Executor Groups</th>
</tr>
</thead>
<tbody>
{{#backends}}
{{?is_blacklisted}}
<tr>
<td><a href='{{webserver_url}}'>Web UI</a></td>
<td>{{address}}</td>
<td>{{krpc_address}}</td>
<td>{{blacklist_cause}}</td>
<td>{{blacklist_time_remaining}}</td>
<td>{{is_coordinator}}</td>
<td>{{is_executor}}</td>
<td>{{admit_mem_limit}}</td>
<td>{{mem_reserved}}</td>
<td>{{mem_admitted}}</td>
<td>{{admission_slots_in_use}}/{{admission_slots}}</td>
<td>{{num_admitted}}</td>
<td>{{executor_groups}}</td>
</tr>
{{/is_blacklisted}}
{{/backends}}
</tbody>
</table>
{{/num_blacklisted_backends}}
<script>
$(document).ready(function() {
$('#backends').DataTable({
"order": [[ 0, "desc" ]],
"pageLength": 100
});
});
$(document).ready(function() {
$('#quiescing_backends').DataTable({
"order": [[ 0, "desc" ]],
"pageLength": 100
});
});
$(document).ready(function() {
$('#blacklisted_backends').DataTable({
"order": [[ 0, "desc" ]],
"pageLength": 100
});
});
</script>
{{> www/common-footer.tmpl}}