[
https://issues.apache.org/jira/browse/TEZ-2960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15028361#comment-15028361
]
Sreenath Somarajapuram commented on TEZ-2960:
---------------------------------------------
Thank you [~hitesh]
Urls in ember:
- From ember perspective there are three parts to an url. Host, namespace &
path. Ember's adapter use these three properties to construct a URL.
- For instance in http://ats.com:8188/ws/v1/timeline/TEZ_DAG_ID
-- host = http://ats.com:8188
-- namespace = ws/v1/timeline
-- path = TEZ_DAG_ID
bq. What does "otherNamespace" refer to?
- As you can see in
https://github.com/apache/tez/blob/master/tez-ui/src/main/webapp/app/scripts/default-configs.js,
we already have a hash for configuring rest namespaces.
- otherNamespace was added to configure links that leads to non REST end point.
bq. Is rmTrackingUrl being used in multiple places with different implications?
- rmTrackingUrl is used only at one place. In TezAppIndexController's template
(https://github.com/apache/tez/blob/master/tez-ui/src/main/webapp/app/templates/tez-app/index.hbs)
- Its implemented in the controller as we need the url to change when ever the
appId change.
- And also, rmTrackingUrl is not actually a function. It's an ember construct
called computed property. Kind of a getter.
bq. Should there be just 2 different variables instead of trying to construct
the same variable in different contexts?
- Not sure if I completely understands that.
bq. Also, can you please clarify how this make things easier for the Ambari Tez
view?
- In standalone the otherNamespace url would be rm.com/cluster/app/{app-id}
- In Ambari the url would be,
ambari.com/api/v1/views/{viewName}/versions/{version}/instances/{instanceName}/resources/rmproxy/cluster/app/{app-id}
- So as mentioned in AMBARI-14058, for things to work we just need to set the
following, and the UI would construct the correct url.
{code}
otherNamespace: {
cluster: '%@rmproxy/cluster'.fmt(resourcesPrefix)
},
{code}
Change in proxy expected from AMBARI-14058:
- As of now rmproxy just proxies JSON data.
- So we are not able to hit other resources.
- Compared to loading RM url from the UI for constructing URLs, its a very
minimal change to make the proxy redirect non JSON requests.
In short on hitting
ambari.com/api/v1/views/{viewName}/versions/{version}/instances/{instanceName}/resources/rmproxy/cluster/app/{app-id},
ambari proxy will redirect the page to the correct RM url and the user would
be able to see the expected UI.
> Tez UI: Move hardcoded url namespace to the configuration file.
> ---------------------------------------------------------------
>
> Key: TEZ-2960
> URL: https://issues.apache.org/jira/browse/TEZ-2960
> Project: Apache Tez
> Issue Type: Bug
> Reporter: Sreenath Somarajapuram
> Assignee: Sreenath Somarajapuram
> Attachments: TEZ-2960.1.patch
>
>
> '/cluster/app/' namespace to construct the rmTrackingURL is hard coded in
> TezAppIndexController.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)