浏览代码

AMBARI-7208. Adding HDFS service to a cluster does not create SNameNode host component. (jaimin)

Jaimin Jetly 10 年之前
父节点
当前提交
c0f9fdeccc
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 2 1
      ambari-web/app/app.js
  2. 3 3
      ambari-web/app/controllers/wizard/step8_controller.js

+ 2 - 1
ambari-web/app/app.js

@@ -87,7 +87,8 @@ module.exports = Em.Application.create({
    */
   isHaEnabled: function () {
     if (!this.get('isHadoop2Stack')) return false;
-    return !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE');
+    var isHDFSInstalled = App.Service.find().findProperty('serviceName','HDFS');
+    return isHDFSInstalled && !this.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE');
   }.property('router.clusterController.isLoaded', 'isHadoop2Stack'),
 
   /**

+ 3 - 3
ambari-web/app/controllers/wizard/step8_controller.js

@@ -648,7 +648,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, {
         // skip components that was hide on assign master page
         if (component.get('isMaster') && !component.get('isShownOnInstallerAssignMasterPage')) return;
         // no HA component
-        if (App.get('isHaEnabled') && component.get('isHAComponentOnly')) return;
+        if (component.get('isHAComponentOnly')) return;
         var displayName;
         if (component.get('isClient')) {
           displayName = Em.I18n.t('common.clients')
@@ -693,9 +693,9 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, {
       }
       else {
         console.log(' --- ---INFO: step8: NOT component isMaster');
+        var componentName = component.get('isClient') ? Em.I18n.t('common.client').toUpperCase() : component.get('componentName');
         var hostsLength = this.get('content.slaveComponentHosts')
-          .findProperty('componentName', component.get('isClient') ? Em.I18n.t('common.client').toUpperCase() : component.get('componentName'))
-          .hosts.length;
+          .findProperty('componentName', componentName).hosts.length;
         componentValue = hostsLength + Em.I18n.t('installer.step8.host' + ((hostsLength > 1) ? 's' : ''));
       }
     }