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

Akhil PB commented on YARN-9089:
--------------------------------

[~eyang] Yes, It is the convention we are following to use initializers in 
ember (here loader.js) to set ENV configs. As you go through loader.js, you can 
see that we are setting all the env configs in loader.js, which works in both 
dev mode (running ui2 in local development) and embedded mode (running UI2 from 
RM - http//rm-host:8088/ui2).

For example, please follow the steps of how cluster-id is being set to the ENV. 
Please refere {{initializers/loader.js}} for more clarity.
{code}
var clusterIdFromYARN = getClusterIdFromYARN(rmhost, application);
ENV.clusterId = clusterIdFromYARN;
{code}
{code}
function getClusterIdFromYARN(rmhost, application) {
  var httpUrl = window.location.protocol + '//' +
    (ENV.hosts.localBaseAddress? ENV.hosts.localBaseAddress + '/' : '') + 
rmhost;

  httpUrl += '/conf?name=yarn.resourcemanager.cluster-id';
  Ember.Logger.log("Get cluster-id URL is: " + httpUrl);

  var clusterId = "";
  $.ajax({
    type: 'GET',
    dataType: 'json',
    async: false,
    context: this,
    url: httpUrl,
    success: function(data) {
      clusterId = data.property.value;
      Ember.Logger.log("Cluster Id from RM: " + clusterId);
      application.advanceReadiness();
    },
    error: function() {
      application.advanceReadiness();
    }
  });
  return clusterId;
}
{code}

> 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
>
>
> 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: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to