blob: f9d290dfe14b6c808eb1284d96b8a2b5dccd7a39 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<rules>
<rule dir="IN" name="HBASEUI/hbase/inbound/master/root/qualified" pattern="*://*:*/**/hbase/webui/?{host}?{port}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/master-status"/>
</rule>
<!-- Make sure that redirects back to the master landing page work -->
<rule dir="OUT" name="HBASEUI/hbase/outbound/master/root" pattern="/">
<rewrite template="{$frontend[url]}/hbase/webui/"/>
</rule>
<!-- Master convenience URLs -->
<rule dir="IN" name="HBASEUI/hbase/inbound/master/home" pattern="*://*:*/**//hbase/webui/master?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/master-status?{**} "/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/master/home" pattern="//{host}:{port}/master-status?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/master-status?host={$hostmap(host)}?{port}?{**}"/>
</rule>
<!-- RS convenience URLs -->
<rule dir="IN" name="HBASEUI/hbase/inbound/regionserver/home" pattern="*://*:*/**//hbase/webui/regionserver?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/rs-status?{**} "/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/home" pattern="//{host}:{port}/rs-status?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/rs-status?host={$hostmap(host)}?{port}?{**}"/>
</rule>
<!-- Load a RegionServer's status page -->
<rule dir="IN" name="HBASEUI/hbase/inbound/regionserver/home" pattern="*://*:*/**//hbase/webui/regionserver?{host}?{port}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/rs-status"/>
</rule>
<!-- Yes, we have both explicit and implicit scheme for rs-status outbound links. Need these both -->
<rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/home" pattern="*://{host}:{port}/rs-status/">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/rs-status?host={$hostmap(host)}?{port}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/home" pattern="//{host}:{port}/rs-status/">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/rs-status?host={$hostmap(host)}?{port}"/>
</rule>
<!-- region.jsp -->
<rule dir="IN" name="HBASEUI/hbase/inbound/regions" pattern="*://*:*/**/hbase/webui/regionserver/region.jsp?{host}?{port}?{name}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/region.jsp?{name}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/regions" pattern="/region.jsp?{name}?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/region.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/regions" pattern="//{host}:{port}/region.jsp?{name}">
<rewrite template="{$frontend[url]}/hbase/webui/region.jsp?host={host}?{port}?{name}"/>
</rule>
<!-- storeFile.jsp -->
<rule dir="IN" name="HBASEUI/hbase/inbound/storefile" pattern="*://*:*/**/hbase/webui/regionserver/storeFile.jsp?{host}?{port}?{name}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/storeFile.jsp?{name}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/storefile" pattern="/storeFile.jsp?{name}">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/storeFile.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{name}"/>
</rule>
<rule dir="IN" name="HBASEUI/hbase/inbound/processMaster" pattern="*://*:*/**/hbase/webui/processMaster.jsp">
<rewrite template="{$serviceUrl[HBASEUI]}/processMaster.jsp"/>
</rule>
<!-- LogLevel servlet -->
<rule dir="IN" name="HBASEUI/hbase/inbound/loglevel" pattern="*://*:*/**/hbase/webui/logLevel?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/logLevel?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/loglevel" pattern="/logLevel?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/logLevel?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<!-- Profiler servlet -->
<!-- prof-output sets the Refresh header to render the SVG after the profiler finishes.
This sets up a filter to catch that Refresh header and rewrite it to point to the
proxied location instead of the original.
-->
<rule dir="IN" name="HBASEUI/hbase/inbound/profiler" pattern="*://*:*/**/hbase/webui/prof?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/prof?{**}"/>
</rule>
<rule dir="IN" name="HBASEUI/hbase/inbound/prof_output" pattern="*://*:*//**/hbase/webui/prof-output/{**}?{host}?{port}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/prof-output/{**}?host={host}?port={port}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/profiler" pattern="/prof?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/prof?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<filter name="HBASEUI/hbase/webui/outbound/headers/prof-output">
<content type="application/x-http-headers">
<apply path="Refresh" rule="HBASEUI/hbase/webui/outbound/headers/prof-output/refresh"/>
</content>
</filter>
<rule dir="OUT" name="HBASEUI/hbase/webui/outbound/headers/prof-output/refresh" pattern="*;/prof-output/{**}?{**}">
<!-- Can we somehow parse the literal number to wait before redirect instead of picking the constant 5s? -->
<rewrite template="{$prefix[5;,url]}{$frontend[url]}/hbase/webui/prof-output/{**}?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<!-- zk.jsp on the Master page -->
<rule dir="IN" name="HBASEUI/hbase/inbound/zkdump" pattern="*://*:*/**/hbase/webui/master/zk.jsp?{host}?{port}?{**}">
<rewrite template="{$servicScheme[HBASEUI]}://{host}:{port}/zk.jsp?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/webui/outbound/zkdump" pattern="//{host}:{port}/zk.jsp?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/zk.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/webui/outbound/zkdump2" pattern="/zk.jsp?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/zk.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<!-- table.jsp, the IN is handled by master/all_children -->
<rule dir="OUT" name="HBASEUI/table" pattern="/table.jsp?{name}">
<rewrite template="{$frontend[url]}/hbase/webui/master/table.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{name}"/>
</rule>
<!-- WIP of master UI using query string to carry host and port -->
<rule dir="IN" name="HBASEUI/hbase/inbound/master/all_children" pattern="*://*:*/**/hbase/webui/master/{**}?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/{**}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/master/children" pattern="/master-status?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/master-status?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/master/children" pattern="/tablesDetailed.jsp?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/tablesDetailed.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/master/children" pattern="/procedures.jsp?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/procedures.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/master/children" pattern="/processMaster.jsp?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/processMaster.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/master/children" pattern="/hbck.jsp?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/master/hbck.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<!-- RegionServer UI proxying -->
<rule dir="IN" name="HBASEUI/hbase/inbound/regionserver/root/qualified" pattern="*://*:*/**/hbase/webui/regionserver?{host}?port}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/rs-status"/>
</rule>
<rule dir="IN" name="HBASEUI/hbase/inbound/regionserver/all_children" pattern="*://*:*/**/hbase/webui/regionserver/{**}?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/{**}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/children" pattern="/rs-status?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/rs-status?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/children" pattern="/processRS.jsp">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/processRS.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/children" pattern="/tablesDetailed.jsp">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/tablesDetailed.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/regionserver/children" pattern="/procedures.jsp">
<rewrite template="{$frontend[url]}/hbase/webui/regionserver/procedures.jsp?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
</rule>
<!-- Generic proxying. We can't keep everything separated by master or RegionServer
because some of them generate the same outbound link and we'd mess up our URLs
(e.g. viewing RegionServer logs on a url that says `master`)-->
<rule dir="IN" name="HBASEUI/hbase/inbound/logfile" pattern="*://*:*/**/hbase/webui/{host}/{port}/logs/{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/{host}/{port}/logs/{**}"/>
</rule>
<rule dir="IN" name="HBASEUI/hbase/inbound/logs" pattern="*://*:*/**/hbase/webui/logs/?{host}?{port}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/logs/"/>
</rule>
<rule dir="IN" name="HBASEUI/hbase/inbound/logs/files" pattern="*://*:*/**/hbase/webui/logs/{**}?{host}?{port}">
<rewrite template="{$serviceScheme[HBASEUI]}://{$hostmap(host)}:{port}/logs/{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/logs" pattern="/logs">
<rewrite template="{$frontend[url]}/hbase/webui/logs?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/logs" pattern="/logs/{**}">
<rewrite template="{$frontend[url]}/hbase/webui/logs/{**}?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
</rule>
<!-- Configuration servlet -->
<rule dir="IN" name="HBASEUI/hbase/inbound/conf" pattern="*://*:*/**/hbase/webui/conf?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/conf?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/conf" pattern="/conf?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/conf?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<!-- Debug dump servlet -->
<rule dir="IN" name="HBASEUI/hbase/inbound/dump" pattern="*://*:*/**/hbase/webui/dump?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/dump?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/dump" pattern="/dump?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/dump?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<!-- JMX metrics -->
<rule dir="IN" name="HBASEUI/hbase/inbound/jmx" pattern="*://*:*/**/hbase/webui/jmx?{host}?{port}?{**}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/jmx?{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/jmx" pattern="/jmx?{**}">
<rewrite template="{$frontend[url]}/hbase/webui/jmx?host={$inboundurl[host]}?port={$inboundurl[port]}?{**}"/>
</rule>
<!-- Static file serving -->
<rule dir="IN" name="HBASEUI/hbase/inbound/static" pattern="*://*:*/**/hbase/webui/static/{**}">
<rewrite template="{$serviceUrl[HBASEUI]}/static/{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/png" pattern="/static/hbase_logo_small.png">
<rewrite template="{$frontend[url]}/hbase/webui/static/hbase_logo_small.png"/>
</rule>
<rule dir="OUT" name="HBASEUI/css" pattern="/static/css/{**}">
<rewrite template="{$frontend[url]}/hbase/webui/static/css/{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/js" pattern="/static/js/{**}">
<rewrite template="{$frontend[url]}/hbase/webui/static/js/{**}"/>
</rule>
<rule dir="OUT" name="HBASEUI/static" pattern="/static/{**}">
<rewrite template="{$frontend[url]}/hbase/webui/static/{**}"/>
</rule>
<rule dir="IN" name="HBASEUI/hbase/inbound/logs/css" pattern="*://*:*/**/hbase/webui/logs/jetty-dir.css?{host}?{port}">
<rewrite template="{$serviceScheme[HBASEUI]}://{host}:{port}/logs/jetty-dir.css"/>
</rule>
<rule dir="OUT" name="HBASEUI/hbase/outbound/logs/css" pattern="jetty-dir.css">
<rewrite template="{$frontend[url]}/hbase/webui/logs/jetty-dir.css?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
</rule>
</rules>