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/18 12:10:17 UTC

[knox] branch master updated: KNOX-1933 - Add rewrite rules to fix Yarn RM application and logs URL (#119)

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 512147f  KNOX-1933 - Add rewrite rules to fix Yarn RM application and logs URL (#119)
512147f is described below

commit 512147f6fd4677baa8f8ffed6034fac256157337
Author: Ankur Gupta <an...@cloudera.com>
AuthorDate: Thu Jul 18 05:10:13 2019 -0700

    KNOX-1933 - Add rewrite rules to fix Yarn RM application and logs URL (#119)
    
    Testing Done:
    Deployed on a cluster with Knox and made sure these links worked
---
 .../src/main/resources/services/livy/0.4.0/rewrite.xml      | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
index ab33bab..fc2fc6c 100644
--- a/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
+++ b/gateway-service-definitions/src/main/resources/services/livy/0.4.0/rewrite.xml
@@ -32,4 +32,17 @@
   <rule dir="IN" name="LIVYSERVER/livy/path/inbound" pattern="*://*:*/**/livy/{path=**}?{**}">
     <rewrite template="{$serviceUrl[LIVYSERVER]}/{path=**}?{**}"/>
   </rule>
+
+  <rule dir="OUT" name="LIVYSERVER/livy/outbound/sparkurl" pattern="*://*:*/proxy/{**}">
+    <rewrite template="{$frontend[url]}/yarn/proxy/{**}"/>
+  </rule>
+
+  <rule dir="OUT" name="LIVYSERVER/livy/outbound/logs" pattern="{scheme}://{host}:{port}/node/containerlogs/{**}?{**}">
+    <rewrite template="{$frontend[url]}/yarn/nodemanager/node/containerlogs/{**}?{**}?{scheme}?host={$hostmap(host)}?{port}"/>
+  </rule>
+
+  <rule dir="OUT" name="LIVYSERVER/livy/outbound/logs2" pattern="{scheme}://{host}:{port}/node/containerlogs/{**}">
+    <rewrite template="{$frontend[url]}/yarn/nodemanager/node/containerlogs/{**}?{scheme}?host={$hostmap(host)}?{port}"/>
+  </rule>
+
 </rules>