diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java index b4f02fc..ee25ea3 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java @@ -97,8 +97,9 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl (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.*")) { + } else if ((e.getCause() instanceof MetaException) && ( + e.getCause().getMessage().matches("(?s).*JDO[a-zA-Z]*Exception.*") || + e.getCause().getMessage().matches(".*org\\.apache\\.thrift\\.[a-zA-Z\\.]+Exception.*"))) { caughtException = (MetaException) e.getCause(); } else { throw e.getCause();