Browse Source

AMBARI-7519 Modify HiveServer2 dynamic service discovery config defaults & add ZooKeeper as a dependency for Hive in Ambari. (ababiichuk)

aBabiichuk 10 years ago
parent
commit
90cca9bba1

+ 7 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/configuration/hive-site.xml

@@ -311,7 +311,7 @@ limitations under the License.
 
 
   <property>
   <property>
     <name>hive.server2.support.dynamic.service.discovery</name>
     <name>hive.server2.support.dynamic.service.discovery</name>
-    <value>false</value>
+    <value>true</value>
     <description>Whether HiveServer2 supports dynamic service discovery for its
     <description>Whether HiveServer2 supports dynamic service discovery for its
       clients. To support this, each instance of HiveServer2 currently uses
       clients. To support this, each instance of HiveServer2 currently uses
       ZooKeeper to register itself, when it is brought up. JDBC/ODBC clients
       ZooKeeper to register itself, when it is brought up. JDBC/ODBC clients
@@ -320,6 +320,12 @@ limitations under the License.
     </description>
     </description>
   </property>
   </property>
 
 
+  <property>
+    <name>hive.zookeeper.quorum</name>
+    <value>localhost:2181</value>
+    <description>ZooKeeper servers, as comma separated host:port pairs</description>
+  </property>
+
   <property>
   <property>
     <name>hive.server2.zookeeper.namespace</name>
     <name>hive.server2.zookeeper.namespace</name>
     <value>hiveserver2</value>
     <value>hiveserver2</value>

+ 4 - 0
ambari-web/app/controllers/main/host/details.js

@@ -621,6 +621,7 @@ App.MainHostDetailsController = Em.Controller.extend({
     }
     }
     if (services.someProperty('serviceName', 'HIVE')) {
     if (services.someProperty('serviceName', 'HIVE')) {
       urlParams.push('(type=webhcat-site&tag=' + data.Clusters.desired_configs['webhcat-site'].tag + ')');
       urlParams.push('(type=webhcat-site&tag=' + data.Clusters.desired_configs['webhcat-site'].tag + ')');
+      urlParams.push('(type=hive-site&tag=' + data.Clusters.desired_configs['hive-site'].tag + ')');
     }
     }
     if (services.someProperty('serviceName', 'STORM')) {
     if (services.someProperty('serviceName', 'STORM')) {
       urlParams.push('(type=storm-site&tag=' + data.Clusters.desired_configs['storm-site'].tag + ')');
       urlParams.push('(type=storm-site&tag=' + data.Clusters.desired_configs['storm-site'].tag + ')');
@@ -678,6 +679,9 @@ App.MainHostDetailsController = Em.Controller.extend({
     if (configs['webhcat-site']) {
     if (configs['webhcat-site']) {
       configs['webhcat-site']['templeton.zookeeper.hosts'] = zksWithPort;
       configs['webhcat-site']['templeton.zookeeper.hosts'] = zksWithPort;
     }
     }
+    if (configs['hive-site']) {
+      configs['hive-site']['hive.zookeeper.quorum'] = zksWithPort;
+    }
     if (configs['storm-site']) {
     if (configs['storm-site']) {
       configs['storm-site']['storm.zookeeper.servers'] = JSON.stringify(zks).replace(/"/g, "'");
       configs['storm-site']['storm.zookeeper.servers'] = JSON.stringify(zks).replace(/"/g, "'");
     }
     }

+ 11 - 1
ambari-web/app/data/HDP2/site_properties.js

@@ -529,11 +529,21 @@ module.exports =
       "id": "site property",
       "id": "site property",
       "name": "hive.server2.support.dynamic.service.discovery",
       "name": "hive.server2.support.dynamic.service.discovery",
       "displayName": "hive.server2.support.dynamic.service.discovery",
       "displayName": "hive.server2.support.dynamic.service.discovery",
-      "defaultValue": false,
+      "defaultValue": true,
       "displayType": "checkbox",
       "displayType": "checkbox",
       "category": "Advanced hive-site",
       "category": "Advanced hive-site",
       "serviceName": "HIVE"
       "serviceName": "HIVE"
     },
     },
+    {
+      "id": "site property",
+      "name": "hive.zookeeper.quorum",
+      "displayName": "hive.zookeeper.quorum",
+      "defaultValue": "localhost:2181",
+      "displayType": "multiLine",
+      "isVisible": true,
+      "serviceName": "HIVE",
+      "category": "Advanced hive-site"
+    },
   /**********************************************tez-site*****************************************/
   /**********************************************tez-site*****************************************/
     {
     {
       "id": "site property",
       "id": "site property",

+ 2 - 2
ambari-web/app/messages.js

@@ -1707,8 +1707,8 @@ Em.I18n.translations = {
   'hosts.host.installComponent.popup.confirm':'Confirm Install',
   'hosts.host.installComponent.popup.confirm':'Confirm Install',
   'hosts.host.installComponent.msg':'Are you sure you want to install {0}?',
   'hosts.host.installComponent.msg':'Are you sure you want to install {0}?',
   'hosts.host.addComponent.msg':'Are you sure you want to add {0}?',
   'hosts.host.addComponent.msg':'Are you sure you want to add {0}?',
-  'hosts.host.addComponent.addZooKeeper':'Adding ZooKeeper Server may reconfigure such properties:<ul><li>ha.zookeeper.quorum</li><li>hbase.zookeeper.quorum</li><li>templeton.zookeeper.hosts</li><li>yarn.resourcemanager.zk-address</li></ul>',
-  'hosts.host.addComponent.deleteHostWithZooKeeper':'Deleting host with ZooKeeper Server may reconfigure such properties:<ul><li>ha.zookeeper.quorum</li><li>hbase.zookeeper.quorum</li><li>templeton.zookeeper.hosts</li><li>yarn.resourcemanager.zk-address</li></ul>',
+  'hosts.host.addComponent.addZooKeeper':'Adding ZooKeeper Server may reconfigure such properties:<ul><li>ha.zookeeper.quorum</li><li>hbase.zookeeper.quorum</li><li>templeton.zookeeper.hosts</li><li>yarn.resourcemanager.zk-address</li><li>hive.zookeeper.quorum</li></ul>',
+  'hosts.host.addComponent.deleteHostWithZooKeeper':'Deleting host with ZooKeeper Server may reconfigure such properties:<ul><li>ha.zookeeper.quorum</li><li>hbase.zookeeper.quorum</li><li>templeton.zookeeper.hosts</li><li>yarn.resourcemanager.zk-address</li><li>hive.zookeeper.quorum</li></ul>',
   'hosts.host.zooKeeper.configs.save.note': 'This configuration is created by ambari while installing/deleting zookeeper component on a host',
   'hosts.host.zooKeeper.configs.save.note': 'This configuration is created by ambari while installing/deleting zookeeper component on a host',
   'hosts.host.addComponent.note':'<b>Important:</b> After this <i>{0}</i> is installed, go to <i>Services -> Nagios</i> to restart the Nagios service.  This is required for the alerts and notifications to work properly.',
   'hosts.host.addComponent.note':'<b>Important:</b> After this <i>{0}</i> is installed, go to <i>Services -> Nagios</i> to restart the Nagios service.  This is required for the alerts and notifications to work properly.',
   'hosts.host.addComponent.securityNote':'You are running your cluster in secure mode. You must set up the keytab for {0} on {1} before you proceed. Otherwise, the component will not be able to start properly.',
   'hosts.host.addComponent.securityNote':'You are running your cluster in secure mode. You must set up the keytab for {0} on {1} before you proceed. Otherwise, the component will not be able to start properly.',

+ 1 - 0
ambari-web/app/models/service_config.js

@@ -482,6 +482,7 @@ App.ServiceConfigProperty = Ember.Object.extend({
         var zkHosts = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER').mapProperty('hostName');
         var zkHosts = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER').mapProperty('hostName');
         this.setDefaultValue("(\\w*)", zkHosts);
         this.setDefaultValue("(\\w*)", zkHosts);
         break;
         break;
+      case 'hive.zookeeper.quorum':
       case 'templeton.zookeeper.hosts':
       case 'templeton.zookeeper.hosts':
         var zkHosts = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER').mapProperty('hostName');
         var zkHosts = masterComponentHostsInDB.filterProperty('component', 'ZOOKEEPER_SERVER').mapProperty('hostName');
         var zkHostPort = zkHosts;
         var zkHostPort = zkHosts;