hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1637307 - /hive/branches/branch-0.14/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
Date Fri, 07 Nov 2014 08:00:59 GMT
Author: gunther
Date: Fri Nov  7 08:00:58 2014
New Revision: 1637307

URL: http://svn.apache.org/r1637307
Log:
HIVE-8766: Hive RetryHMSHandler should be retrying the metastore operation in case of NucleusException
(Hari Sankar Sivarama Subramaniyan, reviewed by Thejas M Nair)

Modified:
    hive/branches/branch-0.14/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java

Modified: hive/branches/branch-0.14/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java?rev=1637307&r1=1637306&r2=1637307&view=diff
==============================================================================
--- hive/branches/branch-0.14/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
(original)
+++ hive/branches/branch-0.14/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
Fri Nov  7 08:00:58 2014
@@ -34,6 +34,7 @@ import org.apache.hadoop.hive.common.cla
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
+import org.datanucleus.exceptions.NucleusException;
 
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
@@ -132,8 +133,9 @@ public class RetryingHMSHandler implemen
           }
           throw e.getCause();
         } else if (e.getCause() instanceof MetaException && e.getCause().getCause()
!= null
-            && e.getCause().getCause() instanceof javax.jdo.JDOException) {
-          // The JDOException may be wrapped further in a MetaException
+            && (e.getCause().getCause() instanceof javax.jdo.JDOException || 
+            	e.getCause().getCause() instanceof NucleusException)) {
+          // The JDOException or the Nucleus Exception may be wrapped further in a MetaException
           caughtException = e.getCause().getCause();
         } else {
           LOG.error(ExceptionUtils.getStackTrace(e.getCause()));



Mime
View raw message