Skip to content

Commit

Permalink
HADOOP-15984. Update jersey from 1.19 to 2.x. (#7019)
Browse files Browse the repository at this point in the history
Co-authored-by: Akira Ajisaka <[email protected]>
Co-authored-by: Viraj Jasani <[email protected]>
Co-authored-by: Ayush Saxena <[email protected]>
Co-authored-by: PJ Fanning <[email protected]>
Co-authored-by: Steve Loughran <[email protected]>
Co-authored-by: He Xiaoqiao <[email protected]>
Reviewed-by: Steve Loughran <[email protected]>
Reviewed-by: He Xiaoqiao <[email protected]>
Signed-off-by: Shilun Fan <[email protected]>
  • Loading branch information
7 people authored Jan 18, 2025
1 parent f38d707 commit 06d36f5
Show file tree
Hide file tree
Showing 392 changed files with 32,897 additions and 26,930 deletions.
28 changes: 21 additions & 7 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,17 @@ org.xerial.snappy:snappy-java:1.1.10.4
org.yaml:snakeyaml:2.0
org.wildfly.openssl:wildfly-openssl:2.1.4.Final
software.amazon.awssdk:bundle:2.25.53

org.glassfish.jersey.core:jersey-common:2.46
org.glassfish.jersey.core:jersey-server:2.46
org.glassfish.jersey.inject:jersey-hk2:2.46
org.glassfish.jersey.core:jersey-client:2.46
org.glassfish.jersey.test-framework:jersey-test-framework-core:2.46
org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:2.46
org.glassfish.jersey.containers:jersey-container-servlet:2.46
org.glassfish.jersey.containers:jersey-container-servlet-core:2.46
org.glassfish.jersey.media:jersey-media-json-jettison:2.46
org.glassfish.jersey.media:jersey-media-jaxb:2.46
net.jodah:failsafe:2.4.4

--------------------------------------------------------------------------------
This product bundles various third-party components under other open source
Expand Down Expand Up @@ -498,12 +508,6 @@ org.slf4j:slf4j-reload4j:1.7.36
CDDL 1.1 + GPLv2 with classpath exception
-----------------------------------------

com.github.pjfanning:jersey-json:1.22.0
com.sun.jersey:jersey-client:1.19.4
com.sun.jersey:jersey-core:1.19.4
com.sun.jersey:jersey-guice:1.19.4
com.sun.jersey:jersey-server:1.19.4
com.sun.jersey:jersey-servlet:1.19.4
com.sun.xml.bind:jaxb-impl:2.2.3-1
javax.annotation:javax.annotation-api:1.3.2
javax.cache:cache-api:1.1.1
Expand All @@ -513,13 +517,23 @@ javax.websocket:javax.websocket-api:1.0
javax.ws.rs:jsr311-api:1.1.1
javax.xml.bind:jaxb-api:2.2.11

Eclipse Distribution License (EDL) 1.0
--------------------------

jakarta.xml.bind:jakarta.xml.bind-api:2.3.3

Eclipse Public License 1.0
--------------------------

junit:junit:4.13.2
org.jacoco:org.jacoco.agent:0.8.5

Eclipse Public License (EPL) 2.0
--------------------------

jakarta.ws.rs-api:jakarta.ws.rs-api:2.1.6
jakarta.servlet.jsp:jakarta.servlet.jsp-api:2.3.6
jakarta.servlet:jakarta.servlet-api:4.0.4


HSQL License
Expand Down
2 changes: 2 additions & 0 deletions hadoop-client-modules/hadoop-client-check-invariants/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
<exclude>ch.qos.reload4j:reload4j</exclude>
<!-- Leave javax annotations we need exposed -->
<exclude>com.google.code.findbugs:jsr305</exclude>
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>org.glassfish.jersey:*</exclude>
<!-- Leave bouncycastle unshaded because it's signed with a special Oracle certificate so it can be a custom JCE security provider -->
<exclude>org.bouncycastle:*</exclude>
<!-- Leave snappy that includes native methods which cannot be relocated. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ allowed_expr+="|^krb5_udp-template.conf$"
allowed_expr+="|^jetty-dir.css$"
# Snappy java is native library. We cannot relocate it to under org/apache/hadoop.
allowed_expr+="|^org/xerial/"

# Comes from jersey, not sure if relocatable.
allowed_expr+="|^jersey"
# Comes from jakarta, not sure if relocatable.
allowed_expr+="|^javax"
allowed_expr+="|^javassist"
allowed_expr+=")"
declare -i bad_artifacts=0
declare -a bad_contents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<!-- Leave snappy that includes native methods which cannot be relocated. -->
<exclude>org.xerial.snappy:*</exclude>
<exclude>org.ehcache:*</exclude>
<exclude>org.glassfish.jersey:*</exclude>
</excludes>
</banTransitiveDependencies>
<banDuplicateClasses>
Expand Down
10 changes: 2 additions & 8 deletions hadoop-client-modules/hadoop-client-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
106 changes: 19 additions & 87 deletions hadoop-client-modules/hadoop-client-minicluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Add optional runtime dependency on the in-development timeline server module
Expand Down Expand Up @@ -415,72 +419,20 @@
<!-- Skip commons-logging:commons-logging-api because it looks like nothing actually included it -->
<!-- Skip jetty-util because it's in client -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.pjfanning</groupId>
<artifactId>jersey-json</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.cal10n</groupId>
<artifactId>cal10n-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- skip org.apache.avro:avro-ipc because it doesn't look like hadoop-common actually uses it -->
<dependency>
<groupId>net.sf.kosmosfs</groupId>
Expand Down Expand Up @@ -624,23 +576,16 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-grizzly2</artifactId>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<optional>true</optional>
<exclusions>
<!-- excluding because client already has the tomcat version -->
<exclusion>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- skipping jersey-server because it's above -->
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-guice</artifactId>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<optional>true</optional>
</dependency>
<!-- skipping jersey-server because it's above -->
<!-- skipping guice-servlet because it's above -->
<!-- skipping avro because it is in client via hadoop-common -->
<!-- skipping jersey-core because it's above -->
Expand Down Expand Up @@ -709,6 +654,10 @@
<exclude>org.bouncycastle:*</exclude>
<!-- Leave snappy that includes native methods which cannot be relocated. -->
<exclude>org.xerial.snappy:*</exclude>
<exclude>org.glassfish.jersey:*</exclude>
<exclude>org.hamcrest:*</exclude>
<exclude>aopalliance:*</exclude>
<exclude>javassist:*</exclude>
</excludes>
</artifactSet>
<filters>
Expand All @@ -729,24 +678,6 @@
<!-- Since runtime has classes for these jars, we exclude them.
We still want the java services api files, since those were excluded in runtime
-->
<filter>
<artifact>com.sun.jersey:jersey-client</artifact>
<excludes>
<exclude>**/*.class</exclude>
</excludes>
</filter>
<filter>
<artifact>com.sun.jersey:jersey-core</artifact>
<excludes>
<exclude>**/*.class</exclude>
</excludes>
</filter>
<filter>
<artifact>com.sun.jersey:jersey-servlet</artifact>
<excludes>
<exclude>**/*.class</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.hadoop:hadoop-mapreduce-client-jobclient:*</artifact>
<excludes>
Expand All @@ -760,6 +691,7 @@
<excludes>
<exclude>META-INF/versions/9/module-info.class</exclude>
<exclude>META-INF/versions/11/module-info.class</exclude>
<exclude>META-INF/versions/9/javax/xml/bind/ModuleUtil.class</exclude>
</excludes>
</filter>

Expand Down
26 changes: 19 additions & 7 deletions hadoop-client-modules/hadoop-client-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,24 @@
<exclude>org.xerial.snappy:*</exclude>
<!-- leave out kotlin classes -->
<exclude>org.jetbrains.kotlin:*</exclude>
<exclude>org.glassfish.jersey.test-framework:*</exclude>
<exclude>org.glassfish.jersey.media:*</exclude>
<exclude>org.glassfish.jersey.containers:*</exclude>
<exclude>org.glassfish.jersey.test-framework.providers:*</exclude>
<exclude>org.glassfish.hk2:*</exclude>
<exclude>org.glassfish.jersey.inject:*</exclude>
<exclude>org.glassfish.grizzly:*</exclude>
<exclude>org.glassfish.jersey.core:*</exclude>
<exclude>org.glassfish.hk2.external:*</exclude>
<exclude>org.glassfish.jaxb:*</exclude>
<exclude>jakarta.ws.rs:*</exclude>
<exclude>jakarta.annotation:*</exclude>
<exclude>jakarta.validation:*</exclude>
<exclude>jakarta.servlet:*</exclude>
<exclude>javax.annotation:*</exclude>
<exclude>org.hamcrest:*</exclude>
<exclude>aopalliance:*</exclude>
<exclude>javassist:*</exclude>
</excludes>
</artifactSet>
<filters>
Expand All @@ -184,13 +202,6 @@
<exclude>org/apache/jasper/compiler/Localizer.class</exclude>
</excludes>
</filter>
<!-- We rely on jersey for our web interfaces. We want to use its java services stuff only internal to jersey -->
<filter>
<artifact>com.sun.jersey:*</artifact>
<excludes>
<exclude>META-INF/services/javax.*</exclude>
</excludes>
</filter>
<filter>
<!-- skip french localization -->
<artifact>org.apache.commons:commons-math3</artifact>
Expand Down Expand Up @@ -247,6 +258,7 @@
<exclude>META-INF/versions/9/module-info.class</exclude>
<exclude>META-INF/versions/11/module-info.class</exclude>
<exclude>META-INF/versions/18/module-info.class</exclude>
<exclude>META-INF/versions/9/javax/xml/bind/ModuleUtil.class</exclude>
</excludes>
</filter>

Expand Down
Loading

0 comments on commit 06d36f5

Please sign in to comment.