knox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Beauvois (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KNOX-1033) Apache Tez UI support
Date Wed, 04 Oct 2017 07:32:00 GMT

    [ https://issues.apache.org/jira/browse/KNOX-1033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190912#comment-16190912
] 

Pierre Beauvois commented on KNOX-1033:
---------------------------------------

I'm currently working on a first version. I'm facing issues on this one and more particularly
with the REST call to timeline's REST API. AS a result, I can't get any jobs and the UI returns
an error. Any help would be appreciated.

Tez topology:
{code:html}
    <service>
        <role>TEZUI</role> <!-- tez -->
        <url>http://mapr-ha-node-01.bigdata.kvm:9999</url>
    </service>
{code}

tezui rewrite.xml:
{code:html}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rules>
  <rule dir="IN" name="TEZUI/tez/inbound/ws" pattern="*://*:*/**/tez/ws/v1/timeline/{**}">
    <rewrite template="{$serviceUrl[APPLICATIONHISTORYUI]}/ws/v1/timeline/{**}"/>
  </rule>

  <rule dir="IN" name="TEZUI/tez/inbound/root" pattern="*://*:*/**/tez/">
    <rewrite template="{$serviceUrl[TEZUI]}"/>
  </rule>

  <rule dir="IN" name="TEZUI/tez/inbound/path" pattern="*://*:*/**/tez/{**}">
    <rewrite template="{$serviceUrl[TEZUI]}/{**}"/>
  </rule>

  <!--<rule dir="IN" name="TEZUI/tez/inbound/query" pattern="*://*:*/**/tez/{**}?{**}">
    <rewrite template="{$serviceUrl[TEZUI]}/{**}?{**}"/>
  </rule>-->

  <rule dir="IN" name="TEZUI/tez/inbound/assets" pattern="*://*:*/**/tez/assets/{**}">
    <rewrite template="{$serviceUrl[TEZUI]}/assets/{**}"/>
  </rule>

  <rule dir="IN" name="TEZUI/tez/inbound/config" pattern="*://*:*/**/tez/config/{**}">
    <rewrite template="{$serviceUrl[TEZUI]}/config/{**}"/>
  </rule>

  <rule dir="OUT" name="TEZUI/tez/outbound/assets/vendorcss">
    <rewrite template="{$frontend[url]}/tez/assets/vendor.css"/>
  </rule>

  <rule dir="OUT" name="TEZUI/tez/outbound/assets/tezuicss">
    <rewrite template="{$frontend[url]}/tez/assets/tez-ui.css"/>
  </rule>

  <rule dir="OUT" name="TEZUI/tez/outbound/assets/vendorjs">
    <rewrite template="{$frontend[url]}/tez/assets/vendor.js"/>
  </rule>

  <rule dir="OUT" name="TEZUI/tez/outbound/assets/tezuijs">
    <rewrite template="{$frontend[url]}/tez/assets/tez-ui.js"/>
  </rule>

  <rule dir="OUT" name="TEZUI/tez/outbound/config" pattern="config/{**}">
    <rewrite template="{$frontend[url]}/tez/config/{**}"/>
  </rule>

  <rule dir="OUT" name="TEZUI/tez/outbound/jobs" pattern="/{**}">
    <rewrite template="{$frontend[url]}/tez/{**}"/>
  </rule>

  <filter name="TEZUI/tez/outbound/jobs">
    <content type="*/html">
      <apply path="(https?://[^/':,]+:[\d]+)?/ws/v1/timeline" rule="TEZUI/tez/outbound/timelineserver"/>
      <apply path="/#/app" rule="TEZUI/tez/outbound/jobs/app"/>
      <apply path="/#/attempt" rule="TEZUI/tez/outbound/jobs/attempt"/>
      <apply path="/#/dag" rule="TEZUI/tez/outbound/jobs/dag"/>
      <apply path="/#/task" rule="TEZUI/tez/outbound/jobs/task"/>
      <apply path="/#/vertex" rule="TEZUI/tez/outbound/jobs/vertex"/>
    </content>
  </filter>

<filter name="TEZUI/tez/outbound/headers/tezmainpage">
    <content type="*/html">
        <apply path="assets/tez-ui.css" rule="TEZUI/tez/outbound/assets/tezuicss"/>
        <apply path="assets/vendor.css" rule="TEZUI/tez/outbound/assets/vendorcss"/>
        <apply path="assets/tez-ui.js" rule="TEZUI/tez/outbound/assets/tezuijs"/>
        <apply path="assets/vendor.js" rule="TEZUI/tez/outbound/assets/vendorjs"/>
    </content>
</filter>

<rule dir="OUT" name="TEZUI/tez/outbound/jobs/app">
    <rewrite template="{$frontend[url]}/tez/#/app"/>
</rule>

<rule dir="OUT" name="TEZUI/tez/outbound/jobs/attempt">
    <rewrite template="{$frontend[url]}/tez/#/attempt"/>
</rule>

<rule dir="OUT" name="TEZUI/tez/outbound/jobs/dag">
    <rewrite template="{$frontend[url]}/tez/#/dag"/>
</rule>

<rule dir="OUT" name="TEZUI/tez/outbound/jobs/task">
    <rewrite template="{$frontend[url]}/tez/#/task"/>
</rule>

<rule dir="OUT" name="TEZUI/tez/outbound/jobs/vertex">
    <rewrite template="{$frontend[url]}/tez/#/vertex"/>
</rule>

<rule dir="OUT" name="TEZUI/tez/outbound/timelineserver">
    <rewrite template="{$frontend[url]}/tez/ws/v1/timeline"/>
</rule>

</rules>
{code}

tezui service.xml:
{code:html}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<service role="TEZUI" name="tez" version="0.8.4">
<routes>

<route path="/timeline/v1/timeline/**?**">
<rewrite apply="TEZUI/tez/inbound/ws/timeline/request" to="request.url"/>
</route>
<route path="/tez/"/>
<route path="/tez/**"/>
<route path="/tez/**?**"/>

</routes>

</service>

{code}

NB: I'm testing the service with Tez 0.8.4.

> Apache Tez UI support
> ---------------------
>
>                 Key: KNOX-1033
>                 URL: https://issues.apache.org/jira/browse/KNOX-1033
>             Project: Apache Knox
>          Issue Type: New Feature
>          Components: Server
>    Affects Versions: 0.13.0
>         Environment: Apache Hadoop clusters, HortonWorks clusters, Cloudera clusters,
MapR clusters
>            Reporter: Pierre Beauvois
>             Fix For: 0.14.0
>
>
> Tez UI as documented here: [Tez UI|https://tez.apache.org/tez-ui.html]
> Tez becomes more and more popular on the market. Supporting its UI is crucial for Knox.
> This feature allow to access the Tez UI through Knox. It could be enabled in your topology
by adding the following sample:
> {code:java}
>     <service>
>         <role>TEZUI</role>
>         <url>http://{tezui-host}:{tezui-port}</url>
>     </service>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message