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

Alexander Pivovarov commented on HIVE-10608:
--------------------------------------------

reconnect() will throw MetaException which does not wrap any other Exceptions 
in case of localMetaStore=true (HiveMetaStoreClient line 308)
{code}
  @Override
  public void reconnect() throws MetaException {
    if (localMetaStore) {
      // For direct DB connections we don't yet support reestablishing 
connections.
      throw new MetaException("For direct MetaStore DB connections, we don't 
support retries" +
          " at the client level.");
    } 
{code}

Should we just fix the bug like this
{code}
  } catch (MetaException e) {
    if (e.getMessage().matches("(?s).*(IO|TTransport)Exception.*")) {
      caughtException = e;
    }
  }
{code}

> Fix useless 'if' stamement in RetryingMetaStoreClient (135)
> -----------------------------------------------------------
>
>                 Key: HIVE-10608
>                 URL: https://issues.apache.org/jira/browse/HIVE-10608
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Alexander Pivovarov
>            Assignee: Alexander Pivovarov
>            Priority: Minor
>
> "if" statement below is useless because it ends with ;
> {code}
>       } catch (MetaException e) {
>         if (e.getMessage().matches("(?s).*(IO|TTransport)Exception.*"));
>         caughtException = e;
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to