ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-12933 Add Oozie service broken. Hangs on Customize service step. (ababiichuk)
Date Mon, 31 Aug 2015 10:38:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 24d5ce920 -> 1d2e6e667


AMBARI-12933 Add Oozie service broken. Hangs on Customize service step. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 1d2e6e667b70b848880d7aba9d1713c40999eae7
Parents: 24d5ce9
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Mon Aug 31 13:32:55 2015 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Mon Aug 31 13:38:13 2015 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step7_controller.js  | 31 ----------------
 .../test/controllers/wizard/step7_test.js       | 37 --------------------
 2 files changed, 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d2e6e66/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 63ce789..daae837 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -912,7 +912,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
App.E
         delete configsMap[type][_config.name];
       }
     });
-    self.setServiceDatabaseConfigs(configs);
     //add user properties
 
     Em.keys(configsMap).forEach(function (filename) {
@@ -938,36 +937,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
App.E
   },
 
   /**
-   * Check if Oozie or Hive use existing database then need
-   * to restore missed properties
-   *
-   * @param {Object[]} configs
-   **/
-  setServiceDatabaseConfigs: function (configs) {
-    var serviceNames = this.get('installedServiceNames').filter(function (serviceName) {
-      return ['OOZIE', 'HIVE'].contains(serviceName);
-    });
-    serviceNames.forEach(function (serviceName) {
-      var propertyPrefix = serviceName.toLowerCase();
-      var dbTypeConfig = configs.findProperty('name', propertyPrefix + '_database');
-      if (!/existing/gi.test(dbTypeConfig.value)) return;
-      var dbHostName = propertyPrefix + '_hostname';
-      var database = dbTypeConfig.value.match(/MySQL|PostgreSQL|Oracle|Derby|MSSQL/gi)[0];
-      var dbPrefix = database.toLowerCase();
-      if (database.toLowerCase() == 'mssql') {
-        if (/integrated/gi.test(dbTypeConfig.value)) {
-          dbPrefix = 'mssql_server_2';
-        } else {
-          dbPrefix = 'mssql_server';
-        }
-      }
-      var propertyName = propertyPrefix + '_existing_' + dbPrefix + '_host';
-      var existingDBConfig = configs.findProperty('name', propertyName);
-      if (existingDBConfig && !existingDBConfig.value)
-        existingDBConfig.value = existingDBConfig.savedValue = configs.findProperty('name',
dbHostName).value;
-    }, this);
-  },
-  /**
    * Add group ids to <code>groupsToDelete</code>
    * Also save <code>groupsToDelete</code> to local storage
    * @param {Ember.Object[]} groups

http://git-wip-us.apache.org/repos/asf/ambari/blob/1d2e6e66/ambari-web/test/controllers/wizard/step7_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js
index 544c3b7..21863c4 100644
--- a/ambari-web/test/controllers/wizard/step7_test.js
+++ b/ambari-web/test/controllers/wizard/step7_test.js
@@ -1653,43 +1653,6 @@ describe('App.InstallerStep7Controller', function () {
 
   });
 
-  describe('#setServiceDatabaseConfigs', function () {
-
-    var controller = App.WizardStep7Controller.create({
-      installedServiceNames: ['OOZIE', 'HIVE']
-    });
-    var configs = [
-      {
-        name: 'hive_database',
-        value: 'MySQL',
-        serviceName: 'HIVE',
-        filename: 'hbase-site.xml'
-      },
-      {
-        name: 'oozie_database',
-        value: 'MySQL',
-        serviceName: 'OOZIE',
-        filename: 'ams-hbase-site.xml'
-      }
-    ];
-
-    it('should handle properties with the same name', function () {
-      var services = Em.A([
-        Em.Object.create({
-          isInstalled: true,
-          serviceName: 'SQOOP'
-        }),
-        Em.Object.create({
-          isInstalled: true,
-          serviceName: 'HDFS'
-        })
-      ]);
-      controller.setServiceDatabaseConfigs(configs);
-      var properties = configs.filterProperty('name', 'hive_database');
-      expect(properties).to.have.length(1);
-    });
-  });
-
   describe('#getAmbariDatabaseSuccess', function () {
 
     var controller = App.WizardStep7Controller.create({


Mime
View raw message