This is an automated email from the ASF dual-hosted git repository.
more 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 8080b28 [Spark History UI Service] Fix executor logs (stdout/stderr)
links (#485)
8080b28 is described below
commit 8080b28f5d71d037752362f511515e2d9e064cb2
Author: Xiao Yu <[email protected]>
AuthorDate: Wed Aug 25 18:19:47 2021 +0000
[Spark History UI Service] Fix executor logs (stdout/stderr) links (#485)
---
.../main/resources/services/sparkhistoryui/2.3.0/rewrite.xml | 12 ++++++++++++
.../main/resources/services/sparkhistoryui/2.3.0/service.xml | 3 +++
2 files changed, 15 insertions(+)
diff --git
a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/rewrite.xml
index 1b5994d..0d30ea0 100644
---
a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/rewrite.xml
+++
b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/rewrite.xml
@@ -98,4 +98,16 @@
<rule dir="OUT"
name="SPARKHISTORYUI/sparkhistory/outbound/yarn/containerlogs2"
pattern="{scheme}://{host}:{port}/node/containerlogs/{**}?{**}">
<rewrite
template="{$frontend[url]}/yarnuiv2/node/containerlogs/{**}?{**}?{scheme}?{host}?{port}"/>
</rule>
+
+ <!-- rewrite JSON response for log locations -->
+ <rule dir="IN" name="SPARKHISTORYUI/sparkhistory/inbound/json/body/jhslogs">
+ <match pattern="{scheme}://{host}:{port}/jobhistory/logs/{**}?{**}"/>
+ <rewrite template="{$frontend[url]}/jobhistory/joblogs/{**}?{**}"/>
+ </rule>
+ <filter name="SPARKHISTORYUI/sparkhistory/inbound/json/body">
+ <content type="*/json">
+ <apply path="$[*]['executorLogs']['stderr']"
rule="SPARKHISTORYUI/sparkhistory/inbound/json/body/jhslogs"/>
+ <apply path="$[*]['executorLogs']['stdout']"
rule="SPARKHISTORYUI/sparkhistory/inbound/json/body/jhslogs"/>
+ </content>
+ </filter>
</rules>
diff --git
a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/service.xml
b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/service.xml
index 39b16f2..a81e2cb 100644
---
a/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/service.xml
+++
b/gateway-service-definitions/src/main/resources/services/sparkhistoryui/2.3.0/service.xml
@@ -44,5 +44,8 @@
<rewrite apply="SPARKHISTORYUI/sparkhistory/outbound/headers/jobs"
to="response.headers"/>
<rewrite apply="SPARKHISTORYUI/sparkhistory/outbound/rqheaders"
to="request.headers"/>
</route>
+ <route path="/sparkhistory/api/v1/applications/**">
+ <rewrite apply="SPARKHISTORYUI/sparkhistory/inbound/json/body"
to="response.body"/>
+ </route>
</routes>
</service>