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 2020/04/21 09:59:54 UTC
[hive] 01/02: HIVE-23248: avro-mapred should not pull in
org.mortbay.jetty (Zoltan Haindrich reviewed by Peter Vary)
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
commit 82139aaad08dd6627e8e7d9ea3d34ee9a5b7f8e7
Author: Zoltan Haindrich <ki...@rxd.hu>
AuthorDate: Tue Apr 21 09:59:11 2020 +0000
HIVE-23248: avro-mapred should not pull in org.mortbay.jetty (Zoltan Haindrich reviewed by Peter Vary)
Signed-off-by: Zoltan Haindrich <zh...@cloudera.com>
---
.../llap/daemon/services/impl/TestLlapWebServices.java | 16 ++++++++++++++++
pom.xml | 10 ++++++++++
2 files changed, 26 insertions(+)
diff --git a/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/services/impl/TestLlapWebServices.java b/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/services/impl/TestLlapWebServices.java
index 5df6ea8..f000dad 100644
--- a/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/services/impl/TestLlapWebServices.java
+++ b/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/services/impl/TestLlapWebServices.java
@@ -26,6 +26,9 @@ import java.io.IOException;
import java.io.StringWriter;
import java.net.HttpURLConnection;
import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
import com.google.common.collect.ImmutableSet;
@@ -46,6 +49,19 @@ public class TestLlapWebServices {
llapWS.init(new HiveConf());
llapWS.start();
Thread.sleep(5000);
+ ensureUniqueInClasspath("javax/servlet/http/HttpServletRequest.class");
+ ensureUniqueInClasspath("javax/servlet/http/HttpServlet.class");
+ }
+
+ private static void ensureUniqueInClasspath(String name) throws IOException {
+ Enumeration<URL> rr = TestLlapWebServices.class.getClassLoader().getResources(name);
+ List<URL> found = new ArrayList<>();
+ while (rr.hasMoreElements()) {
+ found.add(rr.nextElement());
+ }
+ if (found.size() != 1) {
+ throw new RuntimeException(name + " unexpected number of occurences on the classpath:" + found.toString());
+ }
}
@Test
diff --git a/pom.xml b/pom.xml
index 2322957..b29c06c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -485,6 +485,16 @@
<artifactId>avro-mapred</artifactId>
<classifier>hadoop2</classifier>
<version>${avro.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>