Sushanth Sowmyan created HIVE-9436:
--------------------------------------

             Summary: RetryingMetaStoreClient does not retry JDOExceptions
                 Key: HIVE-9436
                 URL: https://issues.apache.org/jira/browse/HIVE-9436
             Project: Hive
          Issue Type: Bug
            Reporter: Sushanth Sowmyan


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