[
https://issues.apache.org/jira/browse/YARN-9089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16720941#comment-16720941
]
Akhil PB edited comment on YARN-9089 at 12/14/18 5:29 AM:
----------------------------------------------------------
[~eyang] patch 4 looks good to me.
{code:java}
var httpUrl = window.location.protocol + "//" +
(ENV.hosts.localBaseAddress ? ENV.hosts.localBaseAddress + '/' : '') +
rmhost
+ ":" + window.location.port + "/conf?name=yarn.nodemanager.webapp.address";
{code}
The above code ensures that UI works in local dev mode too (localBaseAddress is
to avoid cors errors in dev mode). In embedded mode ( ie
[http://rm-host:8088/ui2]), {{localBaseAddress}} won't be used and the rmhost
will be set using window.location.hostname, hence it will work perfectly.
This is how we set rmhost in loader.js. So in prod/embeded mode,
{{ENV.hosts.rmWebAddress}} will be empty, hence {{window.location.hostname}}
will be used as rmhost.
{code}
var hostname = window.location.hostname;
var rmhost = hostname + (window.location.port ? ':' + window.location.port:
'') +
skipTrailingSlash(window.location.pathname);
window.ENV = window.ENV || {};
window.ENV.hosts = window.ENV.hosts || {};
if(!ENV.hosts.rmWebAddress) {
ENV.hosts.rmWebAddress = rmhost;
ENV.hosts.protocolScheme = window.location.protocol;
} else {
rmhost = ENV.hosts.rmWebAddress;
}
{code}
+1 for the patch.
was (Author: akhilpb):
[~eyang] patch 4 looks good to me.
{code}
var httpUrl = window.location.protocol + "//" +
(ENV.hosts.localBaseAddress ? ENV.hosts.localBaseAddress + '/' : '') +
rmhost
+ ":" + window.location.port + "/conf?name=yarn.nodemanager.webapp.address";
{code}
The above code ensures that UI works in local dev mode too (localBaseAddress is
to avoid cors errors in dev mode). In embedded mode ( ie
http://rm-host:8088/ui2), {{localBaseAddress}} won't be used and the rmhost
will be set using window.location.hostname, hence it will work perfectly.
+1 for the patch.
> Add Terminal Link to Service component instance page for UI2
> ------------------------------------------------------------
>
> Key: YARN-9089
> URL: https://issues.apache.org/jira/browse/YARN-9089
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: yarn-ui-v2
> Affects Versions: 3.3.0
> Reporter: Eric Yang
> Assignee: Eric Yang
> Priority: Major
> Attachments: YARN-9089.001.patch, YARN-9089.002.patch,
> YARN-9089.003.patch, YARN-9089.004.patch
>
>
> In UI2, Service > Component > Component Instance uses Timeline server to
> aggregate information about Service component instance. Timeline server does
> not have the full information like the port number of the node manager, or
> the web protocol used by the node manager. It requires some changes to
> aggregate node manager information into Timeline server in order to compute
> the Terminal link. For reducing the scope of YARN-8914, it is better file
> this as a separate task.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]