hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [10/10] hive git commit: HIVE-14195 : HiveMetaStoreClient getFunction() does not throw NoSuchObjectException (Peter Vary, reviewed by Sergey Shelukhin)
Date Wed, 13 Jul 2016 04:36:22 GMT
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/a349f562
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a349f562
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a349f562

Branch: refs/heads/branch-2.1
Commit: a349f5627b24aa9be84acf35f5b09f59bfa5809c
Parents: c323f9a
Author: Sergey Shelukhin <sershe@apache.org>
Authored: Tue Jul 12 21:31:43 2016 -0700
Committer: Sergey Shelukhin <sershe@apache.org>
Committed: Tue Jul 12 21:31:57 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/a349f562/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 83fb15c..9a86fdd 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
@@ -2651,7 +2651,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/a349f562/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 bd2ea97..9e633e5 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -5889,6 +5889,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);


Mime
View raw message