You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/06/30 18:40:28 UTC

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

Author: hashutosh
Date: Sun Jun 30 16:40:28 2013
New Revision: 1498149

URL: http://svn.apache.org/r1498149
Log:
HIVE-4647 : RetryingHMSHandler logs too many error messages (Navis via Ashutosh Chauhan)

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=1498149&r1=1498148&r2=1498149&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 Sun Jun 30 16:40:28 2013
@@ -32,6 +32,7 @@ import org.apache.hadoop.hive.common.cla
 import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.api.MetaException;
+import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
 
 @InterfaceAudience.Private
 @InterfaceStability.Evolving
@@ -126,6 +127,12 @@ public class RetryingHMSHandler implemen
           // Due to reflection, the jdo exception is wrapped in
           // invocationTargetException
           caughtException = e.getCause();
+        } else if (e.getCause() instanceof NoSuchObjectException) {
+          String methodName = method.getName();
+          if (!methodName.startsWith("get_table") && !methodName.startsWith("get_partition")) {
+            LOG.error(ExceptionUtils.getStackTrace(e.getCause()));
+          }
+          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