[ 
https://issues.apache.org/jira/browse/HIVE-20794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16686032#comment-16686032
 ] 

ASF GitHub Bot commented on HIVE-20794:
---------------------------------------

GitHub user ashutosh-bapat opened a pull request:

    https://github.com/apache/hive/pull/487

    Hive20794

    Find more details about the changes in HIVE-20794.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ashutosh-bapat/hive hive20794

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/hive/pull/487.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #487
    
----
commit 383e8be33934d078bad2e8fe1233cc0f3c6119ed
Author: Ashutosh Bapat <ashutosh.bapat.oss@...>
Date:   2018-10-26T08:22:04Z

    HIVE-20794: Use Zookeeper for dynamic service discovery of metastore.
    
    The patch also adds new ZooKeeper configurations for metastore. We reuse 
THRIFT_URIs to specify
    ZooKeeper quorum and have another configuration by name 
THRIFT_SERVICE_DISCOVERY_MODE to specify
    what method to use for dynamic service discovery.
    
    Ashutosh Bapat

commit a38e2e8c9fdc85cd809a1aac9d16ed1d204117bb
Author: Ashutosh Bapat <ashutosh.bapat.oss@...>
Date:   2018-11-13T09:05:03Z

    HIVE-20794: Refactor existing code for supporting metastore dynamic 
discovery using Zookeeper
    
    Extract the code in HiveServer2 dealing with ZooKeeper into a 
ZooKeeperHiveHelper class so that
    it can be used by MetaStore server as well. This also moves the 
ZooKeeperHiveHelper.java into a
    location common to both HiveServer2 and MetaStore code.
    
    Ashutosh Bapat

----


> Use Zookeeper for metastore service discovery
> ---------------------------------------------
>
>                 Key: HIVE-20794
>                 URL: https://issues.apache.org/jira/browse/HIVE-20794
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ashutosh Bapat
>            Assignee: Ashutosh Bapat
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-20794.01
>
>
> Right now, multiple metastore services can be specified in 
> hive.metastore.uris configuration, but that list is static and can not be 
> modified dynamically. Use Zookeeper for dynamic service discovery of 
> metastore.
> h3. Improve ZooKeeperHiveHelper class (suggestions for name welcome)
> The Zookeeper related code (for service discovery) accesses Zookeeper 
> parameters directly from HiveConf. The class is changed so that it could be 
> used for both HiveServer2 and Metastore server and works with both the 
> configurations. Following methods from HiveServer2 are now moved into 
> ZooKeeperHiveHelper. # startZookeeperClient # addServerInstanceToZooKeeper # 
> removeServerInstanceFromZooKeeper
> h3. HiveMetaStore conf changes
>  # THRIFT_URIS (hive.metastore.uris) can also be used to specify ZooKeeper 
> quorum. When THRIFT_SERVICE_DISCOVERY_MODE 
> (hive.metastore.service.discovery.mode) is set to "zookeeper" the URIs are 
> used as ZooKeeper quorum. When it's set to be empty, the URIs are used to 
> locate the metastore directly.
>  # Here's list of Hiveserver2's parameters and their proposed metastore conf 
> counterparts. It looks odd that the Metastore related configurations do not 
> have their macros start with METASTORE, but start with THRIFT. I have just 
> followed naming convention used for other parameters.
> #* HIVE_SERVER2_ZOOKEEPER_NAMESPACE - THRIFT_ZOOKEEPER_NAMESPACE 
> (hive.metastore.zookeeper.namespace)
> #* HIVE_ZOOKEEPER_CLIENT_PORT - THRIFT_ZOOKEEPER_CLIENT_PORT 
> (hive.metastore.zookeeper.client.port)
> #* HIVE_ZOOKEEPER_CONNECTION_TIMEOUT - THRIFT_ZOOKEEPER_CONNECTION_TIMEOUT - 
> (hive.metastore.zookeeper.connection.timeout)
> #* HIVE_ZOOKEEPER_CONNECTION_MAX_RETRIES - 
> THRIFT_ZOOKEEPER_CONNECTION_MAX_RETRIES 
> (hive.metastore.zookeeper.connection.max.retries)
> #* HIVE_ZOOKEEPER_CONNECTION_BASESLEEPTIME - 
> THRIFT_ZOOKEEPER_CONNECTION_BASESLEEPTIME 
> (hive.metastore.zookeeper.connection.basesleeptime)
> Following Hive ZK configurations seem to be related to managing locks and 
> seem irrelevant for MS ZK.
> # HIVE_ZOOKEEPER_SESSION_TIMEOUT
> # HIVE_ZOOKEEPER_CLEAN_EXTRA_NODES
> Since there is no configuration to be published, 
> HIVE_ZOOKEEPER_PUBLISH_CONFIGS does not have a THRIFT counterpart.
> h3. HiveMetaStore class changes
> # startMetaStore should also register the instance with Zookeeper, when 
> configured.
> # When shutting a metastore server down it should deregister itself from 
> Zookeeper, when configured.
> # These changes use the refactored code described above.
> h3. HiveMetaStoreClient class changes
> When service discovery mode is zookeeper, we fetch the metatstore URIs from 
> the specified ZooKeeper and treat those as if they were specified in 
> THRIFT_URIS i.e. use the existing mechanisms to choose a metastore server to 
> connect to and establish a connection.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to