Browse Source

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

Andrii Tkach 9 năm trước cách đây
mục cha
commit
f0411c9d9b

+ 3 - 3
ambari-server/src/main/resources/stacks/HDP/2.1/services/stack_advisor.py

@@ -88,9 +88,9 @@ class HDP21StackAdvisor(HDP206StackAdvisor):
     if hiveEnvProperties and hiveSiteProperties and self.checkSiteProperties(hiveSiteProperties, 'javax.jdo.option.ConnectionDriverName') and self.checkSiteProperties(hiveEnvProperties, 'hive_database'):
       putHiveProperty('javax.jdo.option.ConnectionDriverName', self.getDBDriver(hiveEnvProperties['hive_database']))
     if hiveSiteProperties and hiveEnvProperties and self.checkSiteProperties(hiveSiteProperties, 'ambari.hive.db.schema.name', 'javax.jdo.option.ConnectionURL') and self.checkSiteProperties(hiveEnvProperties, 'hive_database'):
-      hiveMSHost = self.getHostWithComponent('HIVE', 'HIVE_METASTORE', services, hosts)
-      if hiveMSHost is not None:
-        dbConnection = self.getDBConnectionString(hiveEnvProperties['hive_database']).format(hiveMSHost['Hosts']['host_name'], hiveSiteProperties['ambari.hive.db.schema.name'])
+      hiveServerHost = self.getHostWithComponent('HIVE', 'HIVE_SERVER', services, hosts)
+      if hiveServerHost is not None:
+        dbConnection = self.getDBConnectionString(hiveEnvProperties['hive_database']).format(hiveServerHost['Hosts']['host_name'], hiveSiteProperties['ambari.hive.db.schema.name'])
         putHiveProperty('javax.jdo.option.ConnectionURL', dbConnection)
 
     servicesList = [service["StackServices"]["service_name"] for service in services["services"]]

+ 1 - 1
ambari-server/src/test/python/stacks/2.1/common/test_stack_advisor.py

@@ -184,7 +184,7 @@ class TestHDP21StackAdvisor(TestCase):
           },
           "components" : [ {
             "StackServiceComponents" : {
-              "component_name" : "HIVE_METASTORE",
+              "component_name" : "HIVE_SERVER",
               "service_name" : "HIVE",
               "hostnames" : ["example.com"]
             }

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

@@ -1387,7 +1387,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_METASTORE').mapProperty('hostName'), 'MYSQL_SERVER');
+        this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_SERVER').mapProperty('hostName'), 'MYSQL_SERVER');
       } else if (hiveDb.value === "New PostgreSQL Database") {
         this.registerHostsToComponent(masterHosts.filterProperty('component', 'HIVE_SERVER').mapProperty('hostName'), 'POSTGRESQL_SERVER');
       }

+ 1 - 1
ambari-web/test/controllers/wizard/step8_test.js

@@ -1338,7 +1338,7 @@ describe('App.WizardStep8Controller', function () {
         {
           name: 'New MySQL Database',
           component: 'MYSQL_SERVER',
-          expectedHosts: ['h1']
+          expectedHosts: ['h2']
         },
         {
           name: 'New PostgreSQL Database',