ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-9790. Incorrect oozieserver_host and knox_gateway_host initial values. (akovalenko)
Date Wed, 25 Feb 2015 16:34:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk eac740532 -> 58fb4135e


AMBARI-9790. Incorrect oozieserver_host and knox_gateway_host initial values. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 58fb4135e83c390ceca3ee6e3cd6248d6fc93f9b
Parents: eac7405
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Wed Feb 25 15:04:56 2015 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Wed Feb 25 18:33:46 2015 +0200

----------------------------------------------------------------------
 .../controllers/main/service/info/configs.js    | 19 ++++++---
 .../app/controllers/wizard/step8_controller.js  |  2 +-
 ambari-web/app/data/BIGTOP/site_properties.js   |  5 ++-
 ambari-web/app/data/HDP2/site_properties.js     |  9 ++--
 ambari-web/app/data/PHD/site_properties.js      |  5 ++-
 ambari-web/app/models/service_config.js         |  4 +-
 ambari-web/app/views/common/controls_view.js    |  2 +-
 ambari-web/test/models/service_config_test.js   | 44 ++++++++++++++++++++
 .../test/views/common/controls_view_test.js     |  2 +-
 9 files changed, 73 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 086b7fb..c325afe 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -1608,7 +1608,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
     if (configs.someProperty('name', 'oozie_database')) {
       var oozieDb = configs.findProperty('name', 'oozie_database');
       if (oozieDb.value === 'New Derby Database') {
-        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_database'));
@@ -1642,7 +1641,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         if (existingMySqlHost) {
           dbHostPropertyName = 'oozie_existing_mysql_host';
         }
-        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_database'));
@@ -1660,7 +1658,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         if (existingPostgreSqlHost) {
           dbHostPropertyName = 'oozie_existing_postgresql_host';
         }
-        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_database'));
@@ -1676,7 +1673,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         if (existingOracleHost) {
           dbHostPropertyName = 'oozie_existing_oracle_host';
         }
-        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_mysql_database'));
@@ -1690,7 +1686,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         if (existingMySqlServerHost) {
           dbHostPropertyName = 'oozie_existing_mssql_server_host';
         }
-        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_database'));
@@ -1706,7 +1701,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
         if (existingMySql2ServerHost) {
           dbHostPropertyName = 'oozie_existing_mssql_server_2_host';
         }
-        configs = configs.without(configs.findProperty('name', 'oozie_ambari_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_ambari_database'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_host'));
         configs = configs.without(configs.findProperty('name', 'oozie_existing_oracle_database'));
@@ -2205,9 +2199,22 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
       m: true
     },
     {
+      hostProperty: 'hive_ambari_host',
+      componentName: 'HIVE_SERVER',
+      serviceName: 'HIVE',
+      serviceUseThis: []
+    },
+    {
       hostProperty: 'oozieserver_host',
       componentName: 'OOZIE_SERVER',
       serviceName: 'OOZIE',
+      serviceUseThis: [],
+      m: true
+    },
+    {
+      hostProperty: 'oozie_ambari_host',
+      componentName: 'OOZIE_SERVER',
+      serviceName: 'OOZIE',
       serviceUseThis: []
     },
     {

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 4ad1749..4cca5b2 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -302,7 +302,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs,
App.wiz
   removeOozieConfigs: function (configs) {
     var oozieDb = configs.findProperty('name', 'oozie_database');
     if (oozieDb) {
-      var oozie_properties = Em.A(['oozie_ambari_host', 'oozie_ambari_database']);
+      var oozie_properties = Em.A(['oozie_ambari_database']);
 
       switch (oozieDb.value) {
         case 'New Derby Database':

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/app/data/BIGTOP/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/BIGTOP/site_properties.js b/ambari-web/app/data/BIGTOP/site_properties.js
index 03cdea2..36a7084 100644
--- a/ambari-web/app/data/BIGTOP/site_properties.js
+++ b/ambari-web/app/data/BIGTOP/site_properties.js
@@ -2654,6 +2654,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
       "category": "HIVE_METASTORE",
@@ -2780,8 +2781,8 @@ module.exports =
       "displayName": "Oozie Server host",
       "value": "",
       "defaultValue": "",
-      "description": "The host that has been assigned to run Oozie Server",
-      "displayType": "masterHost",
+      "description": "The hosts that have been assigned to run Oozie Server",
+      "displayType": "masterHosts",
       "isOverridable": false,
       "isVisible": true,
       "isRequiredByAgent": false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 3d1c3df..d6bb14b 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1735,8 +1735,8 @@ var hdp2properties = [
     "displayName": "Knox Gateway host",
     "value": "",
     "defaultValue": "",
-    "description": "The host that has been assigned to run Knox Gateway",
-    "displayType": "masterHost",
+    "description": "The hosts that have been assigned to run Knox Gateway",
+    "displayType": "masterHosts",
     "isOverridable": false,
     "isVisible": true,
     "isRequiredByAgent": false,
@@ -3075,6 +3075,7 @@ var hdp2properties = [
     "displayType": "masterHost",
     "isOverridable": false,
     "isVisible": false,
+    "isRequiredByAgent": false,
     "serviceName": "HIVE",
     "filename": "hive-env.xml",
     "category": "HIVE_METASTORE",
@@ -3254,8 +3255,8 @@ var hdp2properties = [
     "displayName": "Oozie Server host",
     "value": "",
     "defaultValue": "",
-    "description": "The host that has been assigned to run Oozie Server",
-    "displayType": "masterHost",
+    "description": "The hosts that have been assigned to run Oozie Server",
+    "displayType": "masterHosts",
     "isOverridable": false,
     "isVisible": true,
     "isRequiredByAgent": false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/app/data/PHD/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/PHD/site_properties.js b/ambari-web/app/data/PHD/site_properties.js
index 9a9375a..cc565db 100644
--- a/ambari-web/app/data/PHD/site_properties.js
+++ b/ambari-web/app/data/PHD/site_properties.js
@@ -2503,6 +2503,7 @@ module.exports =
       "displayType": "masterHost",
       "isOverridable": false,
       "isVisible": false,
+      "isRequiredByAgent": false,
       "serviceName": "HIVE",
       "filename": "hive-env.xml",
       "category": "HIVE_METASTORE",
@@ -2629,8 +2630,8 @@ module.exports =
       "displayName": "Oozie Server host",
       "value": "",
       "defaultValue": "",
-      "description": "The host that has been assigned to run Oozie Server",
-      "displayType": "masterHost",
+      "description": "The hosts that have been assigned to run Oozie Server",
+      "displayType": "masterHosts",
       "isOverridable": false,
       "isVisible": true,
       "isRequiredByAgent": false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js
index a06b870..dc7a4e7 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -461,7 +461,7 @@ App.ServiceConfigProperty = Em.Object.extend({
         }
         break;
       case 'oozieserver_host':
-        this.set('value', masterComponentHostsInDB.findProperty('component', 'OOZIE_SERVER').hostName);
+        this.set('value', masterComponentHostsInDB.filterProperty('component', 'OOZIE_SERVER').mapProperty('hostName'));
         break;
       case 'oozie.base.url':
         var oozieHost = masterComponentHostsInDB.findProperty('component', 'OOZIE_SERVER').hostName;
@@ -527,7 +527,7 @@ App.ServiceConfigProperty = Em.Object.extend({
         this.set('value', slaveComponentHostsInDB.findProperty('componentName', 'SUPERVISOR').hosts.mapProperty('hostName'));
         break;
       case 'knox_gateway_host':
-        this.set('value', masterComponentHostsInDB.findProperty('component', 'KNOX_GATEWAY').hostName);
+        this.set('value', masterComponentHostsInDB.filterProperty('component', 'KNOX_GATEWAY').mapProperty('hostName'));
         break;
       case 'kafka_broker_hosts':
         this.set('value', masterComponentHostsInDB.filterProperty('component', 'KAFKA_BROKER').mapProperty('hostName'));

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/app/views/common/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js
index 0fe2029..809c72f 100644
--- a/ambari-web/app/views/common/controls_view.js
+++ b/ambari-web/app/views/common/controls_view.js
@@ -1026,7 +1026,7 @@ App.CheckDBConnectionView = Ember.View.extend({
   /** @property {String} masterHostName - host name location of Master Component related
to Service **/
   masterHostName: function() {
     var serviceMasterMap = {
-      'OOZIE': 'oozieserver_host',
+      'OOZIE': 'oozie_ambari_host',
       'HDFS': 'hadoop_host',
       'HIVE': 'hive_ambari_host',
       'KERBEROS': 'kdc_host'

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/test/models/service_config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/service_config_test.js b/ambari-web/test/models/service_config_test.js
index bbf9ac4..7b0b516 100644
--- a/ambari-web/test/models/service_config_test.js
+++ b/ambari-web/test/models/service_config_test.js
@@ -846,6 +846,38 @@ describe('App.ServiceConfigProperty', function () {
         defaultValue: 'localhost:2181',
         value: 'h0:2182',
         title: 'should add ZK host and port dynamically'
+      },
+      'oozieserver_host': {
+        localDB: {
+          masterComponentHosts: [
+            {
+              component: 'OOZIE_SERVER',
+              hostName: 'h0'
+            },
+            {
+              component: 'OOZIE_SERVER',
+              hostName: 'h1'
+            }
+          ]
+        },
+        value: ['h0', 'h1'],
+        title: 'array that contains names of hosts with Oozie Server'
+      },
+      'knox_gateway_host': {
+        localDB: {
+          masterComponentHosts: [
+            {
+              component: 'KNOX_GATEWAY',
+              hostName: 'h0'
+            },
+            {
+              component: 'KNOX_GATEWAY',
+              hostName: 'h1'
+            }
+          ]
+        },
+        value: ['h0', 'h1'],
+        title: 'array that contains names of hosts with Knox Gateway'
       }
     };
 
@@ -962,6 +994,18 @@ describe('App.ServiceConfigProperty', function () {
       expect(serviceConfigProperty.get('defaultValue')).to.equal(cases['yarn.resourcemanager.zk-address'].value);
     });
 
+    it(cases['oozieserver_host'].title, function () {
+      serviceConfigProperty.set('name', 'oozieserver_host');
+      serviceConfigProperty.initialValue(cases['oozieserver_host'].localDB);
+      expect(serviceConfigProperty.get('value')).to.eql(cases['oozieserver_host'].value);
+    });
+
+    it(cases['knox_gateway_host'].title, function () {
+      serviceConfigProperty.set('name', 'knox_gateway_host');
+      serviceConfigProperty.initialValue(cases['knox_gateway_host'].localDB);
+      expect(serviceConfigProperty.get('value')).to.eql(cases['knox_gateway_host'].value);
+    });
+
   });
 
   describe('#getHiveMetastoreUris', function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/58fb4135/ambari-web/test/views/common/controls_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/controls_view_test.js b/ambari-web/test/views/common/controls_view_test.js
index dfbef69..f995941 100644
--- a/ambari-web/test/views/common/controls_view_test.js
+++ b/ambari-web/test/views/common/controls_view_test.js
@@ -625,7 +625,7 @@ describe('App.CheckDBConnectionView', function () {
       ],
       categoryConfigsAll = [
         Em.Object.create({
-          name: 'oozieserver_host',
+          name: 'oozie_ambari_host',
           value: 'h0'
         }),
         Em.Object.create({


Mime
View raw message