diff --git metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java index b4f02fc..1417c54 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java @@ -81,7 +81,7 @@ public static IMetaStoreClient getProxy(HiveConf hiveConf, HiveMetaHookLoader ho public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object ret = null; int retriesMade = 0; - TException caughtException = null; + Exception caughtException = null; while (true) { try { reloginExpiringKeytabUser(); @@ -100,6 +100,8 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } else if ((e.getCause() instanceof MetaException) && e.getCause().getMessage().matches("(?s).*JDO[a-zA-Z]*Exception.*")) { caughtException = (MetaException) e.getCause(); + } else if (e.getCause() instanceof MetaException) { + caughtException = (MetaException) e.getCause(); } else { throw e.getCause(); }