Bläddra i källkod

AMBARI-4317. Falcon installation dependency check. (Mikhail Bayuk via akovalenko)

Aleksandr Kovalenko 11 år sedan
förälder
incheckning
b01a7b7fa1

+ 22 - 3
ambari-web/app/controllers/wizard/step4_controller.js

@@ -53,6 +53,8 @@ App.WizardStep4Controller = Em.ArrayController.extend({
     var webhcat = this.findProperty('serviceName', 'WEBHCAT');
     var yarn = this.findProperty('serviceName', 'YARN');
     var mapreduce2 = this.findProperty('serviceName', 'MAPREDUCE2');
+    var oozie = this.findProperty('serviceName', 'OOZIE');
+    var falcon = this.findProperty('serviceName', 'FALCON');
 
     // prevent against getting error when not all elements have been loaded yet
     if (hbase && zookeeper && hive && hcatalog && webhcat) {
@@ -97,6 +99,14 @@ App.WizardStep4Controller = Em.ArrayController.extend({
     return false;
   },
 
+  /**
+   * Check whether we should turn on <code>Oozie</code> service
+   * @return {Boolean}
+   */
+  needToAddOozie: function () {
+    return this.needAddService('OOZIE', ['FALCON']);
+  },
+
   /**
    * Check whether we should turn on <code>MapReduce</code> service
    * @return {Boolean}
@@ -186,8 +196,13 @@ App.WizardStep4Controller = Em.ArrayController.extend({
               if (this.multipleDFSs()) {
                 this.multipleDFSPopup();
               }
-               else {
-                this.validateMonitoring();
+              else {
+                if(this.needToAddOozie()) {
+                  this.oozieCheckPopup();
+                }
+                else {
+                  this.validateMonitoring();
+                }
               }
             }
           }
@@ -251,6 +266,10 @@ App.WizardStep4Controller = Em.ArrayController.extend({
     this.needToAddServicePopup({serviceName:'ZOOKEEPER', selected: true}, 'zooKeeperCheck');
   },
 
+  oozieCheckPopup: function () {
+    this.needToAddServicePopup({serviceName:'OOZIE', selected: true}, 'oozieCheck');
+  },
+
   monitoringCheckPopup: function () {
     App.ModalPopup.show({
       header: Em.I18n.t('installer.step4.monitoringCheck.popup.header'),
@@ -261,4 +280,4 @@ App.WizardStep4Controller = Em.ArrayController.extend({
       }
     });
   }
-});
+});

+ 5 - 6
ambari-web/app/controllers/wizard/step5_controller.js

@@ -353,6 +353,10 @@ App.WizardStep5Controller = Em.Controller.extend({
     return this.getGangliaServer(noOfHosts);
   },
 
+  getOozieServer:function(){
+    return this.selectHost('OOZIE_SERVER');
+  },
+
   getNimbusServer: function(noOfHosts) {
     return this.getGangliaServer(noOfHosts);
   },
@@ -444,12 +448,7 @@ App.WizardStep5Controller = Em.Controller.extend({
       case 'HUE_SERVER':
         return this.getHueServer(noOfHosts);
       case 'FALCON_SERVER':
-        return this.getHostForComponent(noOfHosts, {
-          "3" : 0,
-          "6" : 0,
-          "31" : 1,
-          "else" : 2
-        }).host_name;
+        return this.getOozieServer(noOfHosts);
       case 'STORM_UI_SERVER':
       case 'LOGVIEWER_SERVER':
       case 'DRPC_SERVER':

+ 2 - 0
ambari-web/app/messages.js

@@ -471,6 +471,8 @@ Em.I18n.translations = {
   'installer.step4.yarnCheck.popup.body':'You did not select YARN+MapReduce2, but it is needed by other services you selected. We will automatically add YARN+MapReduce2. Is this OK?',
   'installer.step4.zooKeeperCheck.popup.header':'ZooKeeper Needed',
   'installer.step4.zooKeeperCheck.popup.body':'You did not select ZooKeeper, but it is needed by other services you selected. We will automatically add ZooKeeper. Is this OK?',
+  'installer.step4.oozieCheck.popup.header':'Oozie Needed',
+  'installer.step4.oozieCheck.popup.body':'You did not select Oozie, but it is needed by other services you selected. We will automatically add Oozie. Is this OK?',
   'installer.step4.monitoringCheck.popup.header':'Limited Functionality Warning',
   'installer.step4.monitoringCheck.popup.body':'You did not select Nagios and/or Ganglia. If both are not selected, monitoring and alerts will not function properly. Is this OK?',