This is an automated email from the ASF dual-hosted git repository. ababiichuk pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new d34a5a7 AMBARI-23614 Move NameNode wizard is stuck on Review step after enabling federation. (ababiichuk) d34a5a7 is described below commit d34a5a72b5b42b0f643cf2077c82120df7a988a6 Author: ababiichuk <ababiic...@hortonworks.com> AuthorDate: Wed Apr 18 19:57:25 2018 +0300 AMBARI-23614 Move NameNode wizard is stuck on Review step after enabling federation. (ababiichuk) --- .../main/service/reassign/step3_controller.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ambari-web/app/controllers/main/service/reassign/step3_controller.js b/ambari-web/app/controllers/main/service/reassign/step3_controller.js index d994aaf..65ccce9 100644 --- a/ambari-web/app/controllers/main/service/reassign/step3_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step3_controller.js @@ -543,8 +543,22 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({ _getNnInitializerSettings: function (configs) { var ret = {}; if (App.get('isHaEnabled')) { - ret.namespaceId = configs['hdfs-site']['dfs.nameservices']; - ret.suffix = (configs['hdfs-site']['dfs.namenode.http-address.' + ret.namespaceId + '.nn1'].indexOf(this.get('content.reassignHosts.source')) != -1) ? 'nn1' : 'nn2'; + const configsObject = configs['hdfs-site'], + nameSpaces = configsObject['dfs.nameservices'].split(','), + nameSpacesCount = nameSpaces.length, + propertyNames = Object.keys(configsObject); + for (let i = 0; i < nameSpacesCount; i++) { + const nameSpace = nameSpaces[i], + propertyNameStart = `dfs.namenode.http-address.${nameSpace}.`, + httpAddressPropertiesNames = propertyNames.filter(propertyName => propertyName.startsWith(propertyNameStart)), + matchingPropertyName = httpAddressPropertiesNames.find(propertyName => configsObject[propertyName].startsWith(this.get('content.reassignHosts.source'))); + if (matchingPropertyName) { + const nameSpaceMatch = matchingPropertyName.match(new RegExp(`${propertyNameStart}(\\w+)`)); + ret.namespaceId = nameSpace; + ret.suffix = nameSpaceMatch && nameSpaceMatch[1]; + break; + } + } } return ret; }, -- To stop receiving notification emails like this one, please contact ababiic...@apache.org.