You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2014/11/07 09:00:25 UTC

svn commit: r1637306 - /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java

Author: gunther
Date: Fri Nov  7 08:00:24 2014
New Revision: 1637306

URL: http://svn.apache.org/r1637306
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/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java

Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java?rev=1637306&r1=1637305&r2=1637306&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java Fri Nov  7 08:00:24 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()));