Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setSpecificResourceMangerConfigs: function (configs, targetHostName) {
var sourceHostName = this.get('content.reassignHosts.source');
if (App.get('isRMHaEnabled')) {
if (configs['yarn-site']['yarn.resourcemanager.hostname.rm1'] === sourceHostName) {
configs['yarn-site']['yarn.resourcemanager.hostname.rm1'] = targetHostName;
} else {
configs['yarn-site']['yarn.resourcemanager.hostname.rm2'] = targetHostName;
}
}
},
_getRmInitializerSettings: function (configs) {
return {
suffix: configs['yarn-site']['yarn.resourcemanager.hostname.rm1'] === this.get('content.reassignHosts.source') ? 'rm1': 'rm2'
};
},
_getRmAdditionalDependencies: function (configs) {
var ret = {};
var rm1 = configs['yarn-site']['yarn.resourcemanager.hostname.rm1'];
if (rm1) {
ret.rm1 = rm1;
}
var rm2 = configs['yarn-site']['yarn.resourcemanager.hostname.rm2'];
if (rm2) {
ret.rm2 = rm2;
}
return ret;
},
setSpecificResourceMangerConfigs: function (configs, targetHostName) {
var sourceHostName = this.get('content.reassignHosts.source');
if (App.get('isRMHaEnabled')) {
if (configs['yarn-site']['yarn.resourcemanager.hostname.rm1'] === sourceHostName) {
configs['yarn-site']['yarn.resourcemanager.hostname.rm1'] = targetHostName;
} else {
configs['yarn-site']['yarn.resourcemanager.hostname.rm2'] = targetHostName;
}
}
},