You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kg...@apache.org on 2019/08/29 09:18:44 UTC

[hive] branch master updated: HIVE-21887: Multiple implementations of PersistenceManager are on the classpath (Zoltan Haindrich reviewed by Alan Gates, Laszlo Bodor)

This is an automated email from the ASF dual-hosted git repository.

kgyrtkirk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 04a76e4  HIVE-21887: Multiple implementations of PersistenceManager are on the classpath (Zoltan Haindrich reviewed by Alan Gates, Laszlo Bodor)
04a76e4 is described below

commit 04a76e4cc48a28db8030ead5f45652bf1b2f2d67
Author: Zoltan Haindrich <ki...@rxd.hu>
AuthorDate: Thu Aug 29 11:13:03 2019 +0200

    HIVE-21887: Multiple implementations of PersistenceManager are on the classpath (Zoltan Haindrich reviewed by Alan Gates, Laszlo Bodor)
    
    Signed-off-by: Zoltan Haindrich <ki...@rxd.hu>
---
 metastore/pom.xml                                        | 5 -----
 pom.xml                                                  | 6 ------
 ql/pom.xml                                               | 2 +-
 ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 8 ++++++--
 4 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/metastore/pom.xml b/metastore/pom.xml
index 419a125..e6de6de 100644
--- a/metastore/pom.xml
+++ b/metastore/pom.xml
@@ -112,11 +112,6 @@
       <version>${commons-dbcp.version}</version>
     </dependency>
     <dependency>
-      <groupId>javax.jdo</groupId>
-      <artifactId>jdo-api</artifactId>
-      <version>${jdo-api.version}</version>
-    </dependency>
-    <dependency>
       <groupId>org.antlr</groupId>
       <artifactId>antlr-runtime</artifactId>
       <version>${antlr.version}</version>
diff --git a/pom.xml b/pom.xml
index f2b051d..a1b45b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -171,7 +171,6 @@
     <javax-servlet.version>3.1.0</javax-servlet.version>
     <javax-servlet-jsp.version>2.3.1</javax-servlet-jsp.version>
     <javolution.version>5.5.1</javolution.version>
-    <jdo-api.version>3.0.1</jdo-api.version>
     <jettison.version>1.1</jettison.version>
     <jetty.version>9.3.27.v20190418</jetty.version>
     <jersey.version>1.19</jersey.version>
@@ -360,11 +359,6 @@
         <version>${netty.version}</version>
       </dependency>
       <dependency>
-        <groupId>javax.jdo</groupId>
-        <artifactId>jdo-api</artifactId>
-        <version>${jdo-api.version}</version>
-      </dependency>
-      <dependency>
         <groupId>jakarta.jms</groupId>
         <artifactId>jakarta.jms-api</artifactId>
         <version>${jms.version}</version>
diff --git a/ql/pom.xml b/ql/pom.xml
index 40f195f..6a732bb 100644
--- a/ql/pom.xml
+++ b/ql/pom.xml
@@ -971,7 +971,7 @@
                   <include>org.objenesis:objenesis</include>
                   <include>org.apache.parquet:parquet-hadoop-bundle</include>
                   <include>org.apache.thrift:libthrift</include>
-                  <include>javax.jdo:jdo-api</include>
+                  <include>org.datanucleus:javax.jdo</include>
                   <include>commons-lang:commons-lang</include>
                   <include>org.apache.commons:commons-lang3</include>
                   <include>org.jodd:jodd-core</include>
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index a958657..0ea516f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -244,10 +244,14 @@ public class Hive {
     try {
       reloadFunctions();
       didRegisterAllFuncs.compareAndSet(REG_FUNCS_PENDING, REG_FUNCS_DONE);
-    } catch (Exception e) {
+    } catch (Exception | Error e) {
       LOG.warn("Failed to register all functions.", e);
       didRegisterAllFuncs.compareAndSet(REG_FUNCS_PENDING, REG_FUNCS_NO);
-      throw new HiveException(e);
+      if (e instanceof Exception) {
+        throw new HiveException(e);
+      } else {
+        throw e;
+      }
     } finally {
       synchronized (didRegisterAllFuncs) {
         didRegisterAllFuncs.notifyAll();