You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by kr...@apache.org on 2019/07/23 14:42:29 UTC
[knox] branch master updated: KNOX-1588 - YARN v2 UI - Make sure
that Spark and MR Job history links are handled
This is an automated email from the ASF dual-hosted git repository.
krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new f199443 KNOX-1588 - YARN v2 UI - Make sure that Spark and MR Job history links are handled
f199443 is described below
commit f199443cf943d249ec775d9c0c85c091e23cc6e9
Author: Prabhu Joseph <pj...@cloudera.com>
AuthorDate: Tue Jul 23 20:01:03 2019 +0530
KNOX-1588 - YARN v2 UI - Make sure that Spark and MR Job history links are handled
Signed-off-by: Kevin Risden <kr...@apache.org>
---
.../resources/services/yarnuiv2/3.0.0/rewrite.xml | 26 ++++++++++++++++++++++
.../resources/services/yarnuiv2/3.0.0/service.xml | 4 ++++
2 files changed, 30 insertions(+)
diff --git a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
index 5b32b3d..ef291f9 100644
--- a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
+++ b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/rewrite.xml
@@ -164,6 +164,32 @@
<rewrite template="{$frontend[url]}/yarnuiv2/nodemanager/{**}?{**}?{scheme}?{host}?{port}"/>
</rule>
+ <rule dir="OUT" name="YARNUIV2/yarnuiv2/outbound/apps/history" pattern="*://*:*/proxy/{**}">
+ <rewrite template="{$frontend[url]}/yarnuiv2/proxy/{**}"/>
+ </rule>
+
+ <rule dir="IN" name="YARNUIV2/yarnuiv2/inbound/proxy" pattern="*://*:*/**/yarnuiv2/proxy/{**}?{**}">
+ <rewrite template="{$serviceUrl[YARNUIV2]}/proxy/{**}?{**}"/>
+ </rule>
+
+ <filter name="YARNUIV2/yarnuiv2/outbound/headers/jobhistory/job">
+ <content type="application/x-http-headers">
+ <apply path="Location" rule="YARNUIV2/yarnuiv2/outbound/headers/jobhistory/job/location"/>
+ </content>
+ </filter>
+
+ <rule flow="OR" dir="OUT" name="YARNUIV2/yarnuiv2/outbound/headers/jobhistory/job/location">
+ <match pattern="{scheme}://{host}:{port}/jobhistory/logs/{**}">
+ <rewrite template="{$frontend[url]}/jobhistory/joblogs/{**}?{scheme}?{host}?{port}"/>
+ </match>
+ <match pattern="{scheme}://{host}:{port}/jobhistory/{**}">
+ <rewrite template="{$frontend[url]}/jobhistory/{**}?{scheme}?{host}?{port}"/>
+ </match>
+ <match pattern="*://*:*/history/{**}?{**}">
+ <rewrite template="{$frontend[url]}/sparkhistory/history/{**}?{**}"/>
+ </match>
+ </rule>
+
<rule flow="OR" dir="OUT" name="YARNUIV2/yarnuiv2/outbound/headers/index/location">
<match pattern="{scheme}://{host}:{port}/{gateway}/{knoxsso}/{api}/{v}/websso?originalUrl={**}">
<rewrite template="{scheme}://{host}:{port}/{gateway}/{knoxsso}/{api}/{v}/websso?originalUrl={$postfix[url,/yarnuiv2/]}"/>
diff --git a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
index 8b966a2..27ac2e2 100644
--- a/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
+++ b/gateway-service-definitions/src/main/resources/services/yarnuiv2/3.0.0/service.xml
@@ -38,6 +38,10 @@
<rewrite apply="YARNUIV2/yarnuiv2/inbound/timeline" to="request.url"/>
</route>
+ <route path="/yarnuiv2/proxy/**">
+ <rewrite apply="YARNUIV2/yarnuiv2/outbound/headers/jobhistory/job" to="response.headers"/>
+ </route>
+
<route path="/yarnuiv2/nodemanager/**?**">
<rewrite apply="YARNUIV2/yarnuiv2/inbound/nodemanager" to="request.url"/>
</route>