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 5ce58ee..16b4910 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java @@ -115,11 +115,15 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl (e.getCause() instanceof TTransportException)) { caughtException = (TException) e.getCause(); } else if ((e.getCause() instanceof MetaException) && - e.getCause().getMessage().matches("(?s).*JDO[a-zA-Z]*Exception.*")) { + e.getCause().getMessage().matches + ("(?s).*(JDO[a-zA-Z]*|TApplication|TProtocol|TTransport)Exception.*")) { caughtException = (MetaException) e.getCause(); } else { throw e.getCause(); } + } catch (MetaException e) { + if (e.getMessage().matches("(?s).*(IO|TTransport)Exception.*")); + caughtException = e; } if (retriesMade >= retryLimit) {