[ 
https://issues.apache.org/jira/browse/HIVE-23797?focusedWorklogId=454871&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-454871
 ]

ASF GitHub Bot logged work on HIVE-23797:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Jul/20 14:17
            Start Date: 06/Jul/20 14:17
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on a change in pull request #1201:
URL: https://github.com/apache/hive/pull/1201#discussion_r450251647



##########
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -327,6 +327,13 @@ private void resolveUris() throws MetaException {
       MetaStoreUtils.logAndThrowMetaException(e);
     }
 
+    if (metastoreUrisString.isEmpty() && 
"zookeeper".equalsIgnoreCase(serviceDiscoveryMode)) {
+      throw new MetaException("No metastore server available. "
+          + "Please ensure that at least one metastore server is online");
+    }
+
+    LOG.info("Resolved metastore uris: " + 
Arrays.toString(metastoreUrisString.toArray()));

Review comment:
       Nit:
   
   Do not need to convert it to an array first.  This will work:
   
   `LOG.info("Resolved metastore uris: {}", metastoreUrisString);`

##########
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -327,6 +327,13 @@ private void resolveUris() throws MetaException {
       MetaStoreUtils.logAndThrowMetaException(e);
     }
 
+    if (metastoreUrisString.isEmpty() && 
"zookeeper".equalsIgnoreCase(serviceDiscoveryMode)) {
+      throw new MetaException("No metastore server available. "

Review comment:
       Please add some additional context here regarding ZooKeeper.  Something 
like:
   
   `No metastore store service discovered in ZooKeeper`
   or
   `No metastore store service currently registered in ZookKeeper`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 454871)
    Time Spent: 20m  (was: 10m)

> Throw exception when no metastore  found in zookeeper
> -----------------------------------------------------
>
>                 Key: HIVE-23797
>                 URL: https://issues.apache.org/jira/browse/HIVE-23797
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Zhihua Deng
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When enable service discovery for metastore, there is a chance that the 
> client may find no metastore uris available in zookeeper, such as during 
> metastores startup or the client wrongly configured the path. This results to 
> redundant retries and finally MetaException with "Unknown exception" message.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to