You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2016/07/13 04:36:21 UTC

[09/10] hive git commit: HIVE-14195 : HiveMetaStoreClient getFunction() does not throw NoSuchObjectException (Peter Vary, reviewed by Sergey Shelukhin)

HIVE-14195 : HiveMetaStoreClient getFunction() does not throw NoSuchObjectException (Peter Vary, reviewed by Sergey Shelukhin)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/1d120077
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/1d120077
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/1d120077

Branch: refs/heads/master
Commit: 1d12007718e91286a6082b50fd0b273ae80c5b3a
Parents: 1884d27
Author: Sergey Shelukhin <se...@apache.org>
Authored: Tue Jul 12 21:31:43 2016 -0700
Committer: Sergey Shelukhin <se...@apache.org>
Committed: Tue Jul 12 21:31:43 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java  | 2 +-
 .../src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/1d120077/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
index 641abab..ddfaacf 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
@@ -2696,7 +2696,7 @@ public abstract class TestHiveMetaStore extends TestCase {
       boolean gotException = false;
       try {
         func = client.getFunction(dbName, "nonexistent_func");
-      } catch (MetaException e) {
+      } catch (NoSuchObjectException e) {
         // expected failure
         gotException = true;
       }

http://git-wip-us.apache.org/repos/asf/hive/blob/1d120077/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index c945bf7..c6c1e11 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -5943,6 +5943,9 @@ public class HiveMetaStore extends ThriftHiveMetastore {
           throw new NoSuchObjectException(
               "Function " + dbName + "." + funcName + " does not exist");
         }
+      } catch (NoSuchObjectException e) {
+        ex = e;
+        rethrowException(e);
       } catch (Exception e) {
         ex = e;
         throw newMetaException(e);