hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Liang (JIRA)" <>
Subject [jira] [Commented] (HIVE-10384) RetryingMetaStoreClient does not retry wrapped TTransportExceptions
Date Tue, 21 Apr 2015 21:06:58 GMT


Eric Liang commented on HIVE-10384:

Oh sorry, I misunderstood your comment. I believe that TTransportException is indeed thrown
from within invoke(). For example, see this stack trace:

Got excep
tion: org.apache.thrift.transport.TTransportException null
        at org.apache.thrift.transport.TTransport.readAll(
        at org.apache.thrift.protocol.TBinaryProtocol.readAll(
        at org.apache.thrift.protocol.TBinaryProtocol.readI32(
        at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(
        at org.apache.thrift.TServiceClient.receiveBase(
        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_get_tables(
        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.get_tables(
        at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTables(
        at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
        at java.lang.reflect.Method.invoke(
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(

I believe the offending method that wraps this exception is in MetaStoreUtils:  logAndThrowMetaException(Exception
e) throws MetaException

> RetryingMetaStoreClient does not retry wrapped TTransportExceptions
> -------------------------------------------------------------------
>                 Key: HIVE-10384
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Clients
>            Reporter: Eric Liang
>            Assignee: Chaoyu Tang
>         Attachments: HIVE-10384.patch
> This bug is very similar to HIVE-9436, in that a TTransportException wrapped in a MetaException
will not be retried. RetryingMetaStoreClient has a block of code above the MetaException handler
that retries thrift exceptions, but this doesn't work when the exception is wrapped.
> {code}
>         if ((e.getCause() instanceof TApplicationException) ||
>             (e.getCause() instanceof TProtocolException) ||
>             (e.getCause() instanceof TTransportException)) {
>           caughtException = (TException) e.getCause();
>         } else if ((e.getCause() instanceof MetaException) &&
>             e.getCause().getMessage().matches("(?s).*JDO[a-zA-Z]*Exception.*")) {
>           caughtException = (MetaException) e.getCause();
> {code}

This message was sent by Atlassian JIRA

View raw message