Переглянути джерело

AMBARI-16020 Hive Metastore install failed since mysql-server not installed. (atkach)

Andrii Tkach 9 роки тому
батько
коміт
80c803b8ca

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

@@ -1292,7 +1292,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz
     if (hiveService) {
       var hiveDb = this.get('content.serviceConfigProperties').findProperty('name', 'hive_database');
       if (hiveDb.value == "New MySQL Database") {
-        this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_SERVER').mapProperty('hostName'), 'MYSQL_SERVER');
+        this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_METASTORE').mapProperty('hostName'), 'MYSQL_SERVER');
       } else if (hiveDb.value === "New PostgreSQL Database") {
         this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_SERVER').mapProperty('hostName'), 'POSTGRESQL_SERVER');
       }

+ 11 - 7
ambari-web/test/controllers/wizard/step8_test.js

@@ -1314,11 +1314,15 @@ describe('App.WizardStep8Controller', function () {
       });
 
       var newDatabases = [
-        {name: 'New MySQL Database',
-         component: 'MYSQL_SERVER'
+        {
+          name: 'New MySQL Database',
+          component: 'MYSQL_SERVER',
+          expectedHosts: ['h1']
         },
-        {name: 'New PostgreSQL Database',
-          component: 'POSTGRESQL_SERVER'
+        {
+          name: 'New PostgreSQL Database',
+          component: 'POSTGRESQL_SERVER',
+          expectedHosts: ['h2']
         }
       ];
 
@@ -1332,7 +1336,7 @@ describe('App.WizardStep8Controller', function () {
               },
               content: {
                 masterComponentHosts: [
-                  {component: 'HIVE_SERVER', hostName: 'h1'},
+                  {component: 'HIVE_METASTORE', hostName: 'h1'},
                   {component: 'HIVE_SERVER', hostName: 'h2'}
                 ],
                 services: [
@@ -1349,8 +1353,8 @@ describe('App.WizardStep8Controller', function () {
           it('registerHostsToComponent is called once', function () {
             expect(installerStep8Controller.registerHostsToComponent.calledOnce).to.equal(true);
           });
-          it('hosts are ["h1", "h2"]', function () {
-            expect(installerStep8Controller.registerHostsToComponent.args[0][0]).to.eql(['h1', 'h2']);
+          it('hosts are ' + db.expectedHosts, function () {
+            expect(installerStep8Controller.registerHostsToComponent.args[0][0]).to.eql(db.expectedHosts);
           });
           it('component is ' + db.component, function () {
             expect(installerStep8Controller.registerHostsToComponent.args[0][1]).to.equal(db.component);