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

Hari Sankar Sivarama Subramaniyan commented on HIVE-9436:
---------------------------------------------------------

A minor comment since I remember looking at RetryingHMSHandler code for  
catching Nucleus Exceptions a while back. I think RetryingHMSHandler::invoke 
and RetryingMetaStoreClient::invoke should have similar  exceptions 
caught(except might be TException or something that might be client specific or 
HMS handler specific). Is it possible to factorize the catch part and have them 
called from  RetryingMetaStoreClient::invoke and RetryingHMSHandler::invoke to 
avoid any redundancy/ missing cases. If this is not possible, manually 
comparing these two functions for the exception type handled might help in 
resolving any similar missing exception handling cases. Another point is 
comparing the exception messages for JDOException regex  looks a bit hairy to 
me. Please correct me if this understanding is wrong.

Thanks
Hari

> RetryingMetaStoreClient does not retry JDOExceptions
> ----------------------------------------------------
>
>                 Key: HIVE-9436
>                 URL: https://issues.apache.org/jira/browse/HIVE-9436
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.14.0, 0.13.1
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-9436.patch
>
>
> RetryingMetaStoreClient has a bug in the following bit of code:
> {code}
>         } else if ((e.getCause() instanceof MetaException) &&
>             e.getCause().getMessage().matches("JDO[a-zA-Z]*Exception")) {
>           caughtException = (MetaException) e.getCause();
>         } else {
>           throw e.getCause();
>         }
> {code}
> The bug here is that java String.matches matches the entire string to the 
> regex, and thus, that match will fail if the message contains anything before 
> or after JDO[a-zA-Z]\*Exception. The solution, however, is very simple, we 
> should match .\*JDO[a-zA-Z]\*Exception.\*



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

Reply via email to