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 541953e  AMBARI-23450. NN Federation Wizard: infinite spinner on step3 
with no Ranger installed (akovalenko)
541953e is described below

commit 541953e11830f61ab59b253d3738b017bb505e6f
Author: Aleksandr Kovalenko <akovale...@apache.org>
AuthorDate: Wed Apr 4 14:37:28 2018 +0300

    AMBARI-23450. NN Federation Wizard: infinite spinner on step3 with no 
Ranger installed (akovalenko)
---
 .../main/admin/federation/step3_controller.js       | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 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 f24785f..7458820 100644
--- a/ambari-web/app/controllers/main/admin/federation/step3_controller.js
+++ b/ambari-web/app/controllers/main/admin/federation/step3_controller.js
@@ -99,15 +99,6 @@ App.NameNodeFederationWizardStep3Controller = 
Em.Controller.extend(App.Blueprint
     ret.clustername = App.get('clusterName');
 
     var hdfsSiteConfigs = configsFromServer.findProperty('type', 
'hdfs-site').properties;
-    var hdfsRangerConfigs = configsFromServer.findProperty('type', 
'ranger-hdfs-security').properties;
-
-    if (hdfsRangerConfigs['ranger.plugin.hdfs.service.name'] === 
'{{repo_name}}') {
-      ret.ranger_service_name_ns1 = ret.clustername + '_hadoop_' + 
ret.nameservice1;
-      ret.ranger_service_name_ns2 = ret.clustername + '_hadoop_' + 
ret.nameservice2;
-    } else {
-      ret.ranger_service_name_ns1 = 
hdfsRangerConfigs['ranger.plugin.hdfs.service.name'] + '_' + ret.nameservice1;
-      ret.ranger_service_name_ns2 = 
hdfsRangerConfigs['ranger.plugin.hdfs.service.name'] + '_' + ret.nameservice2;
-    }
 
     var dfsHttpA = hdfsSiteConfigs['dfs.namenode.http-address'];
     ret.nnHttpPort = dfsHttpA ? dfsHttpA.split(':')[1] : 50070;
@@ -118,6 +109,18 @@ App.NameNodeFederationWizardStep3Controller = 
Em.Controller.extend(App.Blueprint
     var dfsRpcA = hdfsSiteConfigs['dfs.namenode.rpc-address'];
     ret.nnRpcPort = dfsRpcA ? dfsRpcA.split(':')[1] : 8020;
 
+    if (App.Service.find().someProperty('serviceName', 'RANGER')) {
+      var hdfsRangerConfigs = configsFromServer.findProperty('type', 
'ranger-hdfs-security').properties;
+
+      if (hdfsRangerConfigs['ranger.plugin.hdfs.service.name'] === 
'{{repo_name}}') {
+        ret.ranger_service_name_ns1 = ret.clustername + '_hadoop_' + 
ret.nameservice1;
+        ret.ranger_service_name_ns2 = ret.clustername + '_hadoop_' + 
ret.nameservice2;
+      } else {
+        ret.ranger_service_name_ns1 = 
hdfsRangerConfigs['ranger.plugin.hdfs.service.name'] + '_' + ret.nameservice1;
+        ret.ranger_service_name_ns2 = 
hdfsRangerConfigs['ranger.plugin.hdfs.service.name'] + '_' + ret.nameservice2;
+      }
+    }
+
     return ret;
   },
 

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

Reply via email to