You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/05/30 01:10:32 UTC

[1/2] git commit: Revert "AMBARI-5948. Unable to Deploy Cluster After Wizard Step 7.(xiwang)"

Repository: ambari
Updated Branches:
  refs/heads/trunk 6826ef4c3 -> 6962851fd


Revert "AMBARI-5948. Unable to Deploy Cluster After Wizard Step 7.(xiwang)"

This reverts commit 48e3201efd5e9c486cabe17b5db68153ceb32f49. This is done to commit AMBARI-5951 which addresses the same issue for both installer and add service wizard.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb77bc4b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb77bc4b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb77bc4b

Branch: refs/heads/trunk
Commit: fb77bc4b9f4ec64f787cdc24f3111c8adc42ae41
Parents: 6826ef4
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu May 29 15:57:16 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu May 29 15:57:16 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step7_controller.js | 10 +++++-----
 ambari-web/app/utils/ajax/ajax.js                     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fb77bc4b/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 0ce33b1..b07ca74 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -965,7 +965,7 @@ App.WizardStep7Controller = Em.Controller.extend({
    */
   getAmbariDatabaseSuccess: function (data) {
     var hiveDBHostname = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hivemetastore_host').value;
-    var ambariDBInfo = JSON.stringify(data.RootServiceComponents.properties);
+    var ambariDBInfo = JSON.stringify(data.hostComponents[0].RootServiceHostComponents.properties);
     this.set('mySQLServerConflict', ambariDBInfo.indexOf('mysql') > 0 && ambariDBInfo.indexOf(hiveDBHostname) > 0);
   },
 
@@ -975,13 +975,12 @@ App.WizardStep7Controller = Em.Controller.extend({
    */
   submit: function () {
     if (!this.get('isSubmitDisabled')) {
-      // if Hive selected, then check mySQLsevers conflict issue: whether hive New MySQL database is on the same host as Ambari server MySQL server
-      if (this.get('stepConfigs').findProperty('serviceName', 'HIVE') &&
-         this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value == 'New MySQL Database') {
+      var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value;
+      if (hiveDBType == 'New MySQL Database') {
         var self= this;
         this.checkMySQLHost().done(function () {
           if (self.get('mySQLServerConflict')) {
-            // hive New MySQL database is on the same host as Ambari server MySQL server, error popup before you can proceed
+            // error popup before you can proceed
             return App.ModalPopup.show({
               header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
               bodyClass: Ember.View.extend({
@@ -1014,4 +1013,5 @@ App.WizardStep7Controller = Em.Controller.extend({
       }
     }
   }
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb77bc4b/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 74fc79b..0cf3937 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -358,7 +358,7 @@ var urls = {
     }
   },
   'config.ambari.database.info': {
-    'real': '/services/AMBARI/components/AMBARI_SERVER?fields=RootServiceComponents/properties/server.jdbc.database,RootServiceComponents/properties/server.jdbc.url',
+    'real': '/services/AMBARI/components/AMBARI_SERVER?fields=hostComponents/RootServiceHostComponents/properties/server.jdbc.database,hostComponents/RootServiceHostComponents/properties/server.jdbc.url',
     'mock': '',
     'format': function() {
       return {


[2/2] git commit: AMBARI-5951. Installer does not proceed beyond Customize Services if Hive is not selected. (yusaku via jaimin)

Posted by ja...@apache.org.
AMBARI-5951. Installer does not proceed beyond Customize Services if Hive is not selected. (yusaku via jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6962851f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6962851f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6962851f

Branch: refs/heads/trunk
Commit: 6962851fdd62095383c1cfda0eb61b0518f3013d
Parents: fb77bc4
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu May 29 16:10:05 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu May 29 16:10:05 2014 -0700

----------------------------------------------------------------------
 .../app/controllers/wizard/step7_controller.js  | 94 ++++++++++++--------
 1 file changed, 58 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6962851f/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index b07ca74..b6b675a 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -970,47 +970,69 @@ App.WizardStep7Controller = Em.Controller.extend({
   },
 
   /**
+   * Check if new MySql database was chosen for Hive service
+   * and it is not located on the same host as Ambari server
+   * that using MySql database too.
+   *
+   * @method resolveHiveMysqlDatabase
+   **/
+  resolveHiveMysqlDatabase: function() {
+    var hiveService = this.get('content.services').findProperty('serviceName', 'HIVE');
+    if (!hiveService || !hiveService.get('isSelected') || hiveService.get('isInstalled')) {
+      this.moveNext();
+    }
+    var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value;
+    if (hiveDBType == 'New MySQL Database') {
+      var self= this;
+      this.checkMySQLHost().done(function () {
+        if (self.get('mySQLServerConflict')) {
+          // error popup before you can proceed
+          return App.ModalPopup.show({
+            header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
+            bodyClass: Ember.View.extend({
+              template: Ember.Handlebars.compile(Em.I18n.t('installer.step7.popup.mySQLWarning.body'))
+            }),
+            secondary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.gotostep5'),
+            primary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.dismiss'),
+            onSecondary: function (){
+              var parent = this;
+              return App.ModalPopup.show({
+                header: Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.header'),
+                bodyClass: Ember.View.extend({
+                  template: Ember.Handlebars.compile( Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.body'))
+                }),
+                onPrimary: function (){
+                  this.hide();
+                  parent.hide();
+                  // go back to step 5: assign masters and disable default navigation warning
+                  App.router.get('installerController').gotoStep(5, true);
+                }
+              });
+            }
+          });
+        } else {
+          self.moveNext();
+        }
+      });
+    } else {
+      this.moveNext();
+    }
+  },
+
+  /**
+   * Proceed to the next step
+   **/
+  moveNext: function() {
+    App.router.send('next');
+  },
+
+  /**
    * Click-handler on Next button
    * @method submit
    */
   submit: function () {
     if (!this.get('isSubmitDisabled')) {
-      var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value;
-      if (hiveDBType == 'New MySQL Database') {
-        var self= this;
-        this.checkMySQLHost().done(function () {
-          if (self.get('mySQLServerConflict')) {
-            // error popup before you can proceed
-            return App.ModalPopup.show({
-              header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
-              bodyClass: Ember.View.extend({
-                template: Ember.Handlebars.compile( Em.I18n.t('installer.step7.popup.mySQLWarning.body'))
-              }),
-              secondary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.gotostep5'),
-              primary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.dismiss'),
-              onSecondary: function (){
-                var parent = this;
-                return App.ModalPopup.show({
-                  header: Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.header'),
-                  bodyClass: Ember.View.extend({
-                    template: Ember.Handlebars.compile( Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.body'))
-                  }),
-                  onPrimary: function (){
-                    this.hide();
-                    parent.hide();
-                    // go back to step 5: assign masters and disable default navigation warning
-                    App.router.get('installerController').gotoStep(5, true);
-                  }
-                });
-              }
-            });
-          } else {
-            App.router.send('next');
-          }
-        });
-      } else {
-        App.router.send('next');
-      }
+      this.resolveHiveMysqlDatabase();
     }
   }