How to use the yarn.resourcemanager.webapp.https.address function in yarn

To help you get started, we’ve selected a few yarn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / ambari / ambari-web / app / controllers / main / admin / highAvailability / resourceManager / step3_controller.js View on Github external
_prepareDependencies: function (data) {
    var ret = {};
    var zooCfg = data && data.items ? data.items.findProperty('type', 'zoo.cfg') : null;
    var yarnSite = data && data.items ? data.items.findProperty('type', 'yarn-site') : null;
    var portValue = zooCfg && Em.get(zooCfg, 'properties.clientPort');
    var webAddressPort = yarnSite && yarnSite.properties ? yarnSite.properties['yarn.resourcemanager.webapp.address'] : '';
    var httpsWebAddressPort = yarnSite && yarnSite.properties ? yarnSite. properties['yarn.resourcemanager.webapp.https.address'] : '';
    const trackerAddressPort = yarnSite && yarnSite.properties ? yarnSite.properties['yarn.resourcemanager.resource-tracker.address'] : '';

    ret.webAddressPort = webAddressPort && webAddressPort.contains(':') ? webAddressPort.split(':')[1] : '8088';
    ret.httpsWebAddressPort = httpsWebAddressPort && httpsWebAddressPort.contains(':') ? httpsWebAddressPort.split(':')[1] : '8090';
    ret.trackerAddressPort = trackerAddressPort && trackerAddressPort.contains(':') ? trackerAddressPort.split(':')[1]: '8025';
    ret.zkClientPort = portValue ? portValue : '2181';
    return ret;
  },