This is an automated email from the ASF dual-hosted git repository.

akovalenko 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 d693edc  AMBARI-23494. Incorrect servicerpc address configs being 
generated by NN Federation wizard (akovalenko)
d693edc is described below

commit d693edc7502280043e76ddc348752a0758950218
Author: Aleksandr Kovalenko <akovale...@apache.org>
AuthorDate: Fri Apr 6 16:53:19 2018 +0300

    AMBARI-23494. Incorrect servicerpc address configs being generated by NN 
Federation wizard (akovalenko)
---
 .../main/admin/federation/step3_controller.js        | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git 
a/ambari-web/app/controllers/main/admin/federation/step3_controller.js 
b/ambari-web/app/controllers/main/admin/federation/step3_controller.js
index 7458820..4ed68fe 100644
--- a/ambari-web/app/controllers/main/admin/federation/step3_controller.js
+++ b/ambari-web/app/controllers/main/admin/federation/step3_controller.js
@@ -26,6 +26,7 @@ App.NameNodeFederationWizardStep3Controller = 
Em.Controller.extend(App.Blueprint
   federationConfig: $.extend(true, {}, 
require('data/configs/wizards/federation_properties').federationConfig),
   once: false,
   isLoaded: false,
+  isConfigsLoaded: false,
   versionLoaded: true,
   hideDependenciesInfoBar: true,
 
@@ -77,20 +78,27 @@ App.NameNodeFederationWizardStep3Controller = 
Em.Controller.extend(App.Blueprint
   onLoadConfigs: function (data) {
     this.set('serverConfigData', data);
     this.removeConfigs(this.get('configsToRemove'), data);
-    this.tweakServiceConfigs(this.get('federationConfig.configs'));
-    this.renderServiceConfigs(this.get('federationConfig'));
-    this.set('isLoaded', true);
+    this.set('isConfigsLoaded', true);
   },
 
+  onLoad: function () {
+    if (this.get('isConfigsLoaded') && 
App.router.get('clusterController.isHDFSNameSpacesLoaded')) {
+      this.tweakServiceConfigs(this.get('federationConfig.configs'));
+      this.renderServiceConfigs(this.get('federationConfig'));
+      this.set('isLoaded', true);
+    }
+  }.observes('isConfigsLoaded', 
'App.router.clusterController.isHDFSNameSpacesLoaded'),
+
   prepareDependencies: function () {
     var ret = {};
     var configsFromServer = this.get('serverConfigData.items');
     var journalNodes = 
App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE');
     var nameNodes = 
this.get('content.masterComponentHosts').filterProperty('component', 
'NAMENODE');
+    var hdfsSiteConfigs = configsFromServer.findProperty('type', 
'hdfs-site').properties;
     ret.nameservice1 = 
App.HDFSService.find().objectAt(0).get('masterComponentGroups')[0].name;
     ret.nameservice2 = this.get('content.nameServiceId');
-    ret.namenode1 = 
nameNodes.filterProperty('isInstalled').mapProperty('hostName')[0];
-    ret.namenode2 = 
nameNodes.filterProperty('isInstalled').mapProperty('hostName')[1];
+    ret.namenode1 = hdfsSiteConfigs['dfs.namenode.rpc-address.' + 
ret.nameservice1 + '.nn1'].split(':')[0];
+    ret.namenode2 = hdfsSiteConfigs['dfs.namenode.rpc-address.' + 
ret.nameservice1 + '.nn2'].split(':')[0];
     ret.namenode3 = nameNodes.filterProperty('isInstalled', 
false).mapProperty('hostName')[0];
     ret.namenode4 = nameNodes.filterProperty('isInstalled', 
false).mapProperty('hostName')[1];
     ret.journalnodes = journalNodes.map(function (c) {
@@ -98,8 +106,6 @@ App.NameNodeFederationWizardStep3Controller = 
Em.Controller.extend(App.Blueprint
     }).join(';');
     ret.clustername = App.get('clusterName');
 
-    var hdfsSiteConfigs = configsFromServer.findProperty('type', 
'hdfs-site').properties;
-
     var dfsHttpA = hdfsSiteConfigs['dfs.namenode.http-address'];
     ret.nnHttpPort = dfsHttpA ? dfsHttpA.split(':')[1] : 50070;
 

-- 
To stop receiving notification emails like this one, please contact
akovale...@apache.org.

Reply via email to