Skip to content

HBASE-25863 Shade javax.ws.rs package for use with shaded Jersey - #51

Merged
ndimiduk merged 2 commits into
apache:masterfrom
ndimiduk:25863-shade-jersey-javax.ws.rs
Nov 29, 2021
Merged

HBASE-25863 Shade javax.ws.rs package for use with shaded Jersey#51
ndimiduk merged 2 commits into
apache:masterfrom
ndimiduk:25863-shade-jersey-javax.ws.rs

Conversation

@ndimiduk

Copy link
Copy Markdown
Member

From the About text,

Jersey RESTful Web Services 2.x framework is open source, production quality, framework for
developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a
JAX-RS (JSR 311 & JSR 339 & JSR 370) Reference Implementation.

javax.ws.rs is defined by the JSRs, so it doesn't make sense that we could have multiple
implementations of that JSR on the classpath simultaniously (via jersey-server-1.x and
jersey-server-2.x jars) without them colliding. By shading over the JSR package space in the
jersey-server-2.x implementation jars, we achieve a completely isolated JSR runtime.

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

Parking this here for now. Will be back with a PR vs. hbase-core that makes use of this, so we can verify it's all working the way we intend.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

ndimiduk added a commit to ndimiduk/hbase that referenced this pull request May 7, 2021

@busbeybusbey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the relocated jaxrs provider is intimately tied to our use of jersey, can we fold this into our packaged relocation of jersey in the hbase-shaded-jersey module?

Comment threadhbase-shaded-jackson-jaxrs-json-provider/pom.xml Outdated
@ndimiduk

Copy link
Copy Markdown
MemberAuthor

Since the relocated jaxrs provider is intimately tied to our use of jersey, can we fold this into our packaged relocation of jersey in the hbase-shaded-jersey module?

I chose intentionally not to do that, because we don't currently use this dependency in the hbase-server classpath. It is only used by hbase-rest. I believe we want to finish the purge of our use of jackson, which means eventually removing this jar and replacing it with an EntityWriter based on Gson.

@busbey

Copy link
Copy Markdown
Contributor

Since the relocated jaxrs provider is intimately tied to our use of jersey, can we fold this into our packaged relocation of jersey in the hbase-shaded-jersey module?

I chose intentionally not to do that, because we don't currently use this dependency in the hbase-server classpath. It is only used by hbase-rest. I believe we want to finish the purge of our use of jackson, which means eventually removing this jar and replacing it with an EntityWriter based on Gson.

Please put a comment to this end in the module pom

@ndimiduk
ndimidukforce-pushed the 25863-shade-jersey-javax.ws.rs branch from fdd0a55 to 74b2d75CompareMay 10, 2021 21:26
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 35sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep0m 6sMaven dependency ordering for branch
+1 💚mvninstall0m 23smaster passed
+1 💚compile0m 15smaster passed
+1 💚javadoc0m 9smaster passed
_ Patch Compile Tests _
+0 🆗mvndep0m 4sMaven dependency ordering for patch
+1 💚mvninstall0m 37sthe patch passed
+1 💚compile0m 19sthe patch passed
+1 💚javac0m 19sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 1sThe patch has no ill-formed XML file.
+1 💚javadoc0m 13sthe patch passed
_ Other Tests _
+1 💚unit0m 5shbase-shaded-jersey in the patch passed.
+1 💚unit0m 4shbase-shaded-jackson-jaxrs-json-provider in the patch passed.
+1 💚unit0m 29sroot in the patch passed.
+1 💚asflicense0m 12sThe patch does not generate ASF License warnings.
3m 44s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Thirdparty-PreCommit/job/PR-51/3/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR#51
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux f4d1f8dc973d 5.4.0-1047-aws #49~18.04.1-Ubuntu SMP Wed Apr 28 23:08:58 UTC 2021 x86_64 GNU/Linux
Build toolmaven
git revisionmaster / 1d73a2e
Default JavaOracle Corporation-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-Thirdparty-PreCommit/job/PR-51/3/testReport/
Max. process+thread count396 (vs. ulimit of 1000)
modulesC: hbase-shaded-jerseyhbase-shaded-jackson-jaxrs-json-provider . U: .
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-Thirdparty-PreCommit/job/PR-51/3/console
versionsgit=2.20.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk
ndimiduk marked this pull request as ready for review May 18, 2021 23:36
@ndimiduk
ndimidukforce-pushed the 25863-shade-jersey-javax.ws.rs branch from 74b2d75 to 48e61a5CompareAugust 25, 2021 22:32
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Aug 25, 2021
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 51sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep0m 20sMaven dependency ordering for branch
+1 💚mvninstall0m 34smaster passed
+1 💚compile0m 48smaster passed
+1 💚javadoc0m 36smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 23smaster passed
+0 🆗mvndep0m 28sMaven dependency ordering for patch
+1 💚mvninstall1m 27sthe patch passed
+1 💚compile0m 51sthe patch passed
+1 💚javac0m 51sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 5sThe patch has no ill-formed XML file.
+1 💚javadoc0m 39sthe patch passed
_ Other Tests _
+1 💚unit0m 9shbase-shaded-protobuf in the patch passed.
+1 💚unit0m 5shbase-shaded-netty in the patch passed.
+1 💚unit0m 4shbase-shaded-gson in the patch passed.
+1 💚unit0m 4shbase-shaded-miscellaneous in the patch passed.
+1 💚unit0m 5shbase-shaded-jetty in the patch passed.
+1 💚unit0m 5shbase-shaded-jersey in the patch passed.
+1 💚unit0m 4shbase-shaded-jackson-jaxrs-json-provider in the patch passed.
+1 💚unit0m 25shbase-noop-htrace in the patch passed.
+1 💚unit0m 30sroot in the patch passed.
+1 💚asflicense0m 38sThe patch does not generate ASF License warnings.
9m 19s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-Thirdparty-PreCommit/job/PR-51/4/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR#51
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux 716d9236acd4 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 GNU/Linux
Build toolmaven
git revisionmaster / c28a235
Default JavaOracle Corporation-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-Thirdparty-PreCommit/job/PR-51/4/testReport/
Max. process+thread count414 (vs. ulimit of 1000)
modulesC: hbase-shaded-protobufhbase-shaded-nettyhbase-shaded-gsonhbase-shaded-miscellaneoushbase-shaded-jettyhbase-shaded-jerseyhbase-shaded-jackson-jaxrs-json-providerhbase-noop-htrace . U: .
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-Thirdparty-PreCommit/job/PR-51/4/console
versionsgit=2.20.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9

Copy link
Copy Markdown
Contributor

So any updates here?

I plan to do a 4.0.0 release for hbase-thirdparty, so we can include this now?

Thanks.

@apurtell

Copy link
Copy Markdown
Contributor

@Apache9 There are two approvals here, I say just go ahead

@ndimiduk

Copy link
Copy Markdown
MemberAuthor

This PR is probably fine to merge. I'd wanted to land the dependent feature in HBase before committing here, but I've been pulled onto other projects and haven't gotten back to finishing it.

@ndimiduk
ndimidukforce-pushed the 25863-shade-jersey-javax.ws.rs branch from 48e61a5 to fee9e85CompareNovember 29, 2021 22:23
… shaded Jersey
From the [About](https://eclipse-ee4j.github.io/jersey/) text,
> Jersey RESTful Web Services 2.x framework is open source, production quality, framework for
> developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a
> JAX-RS (JSR 311 & JSR 339 & JSR 370) Reference Implementation.
`javax.ws.rs` is defined by the JSRs, so it doesn't make sense that we could have multiple
implementations of that JSR on the classpath simultaniously (via jersey-server-1.x and
jersey-server-2.x jars) without them colliding. By shading over the JSR package space in the
jersey-server-2.x implementation jars, we achieve a completely isolated JSR runtime.
Signed-off-by: Sean Busbey <busbey@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
…use with shaded jersey
Make this provider module compatible with our shaded Jersey.
Signed-off-by: Sean Busbey <busbey@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
@ndimiduk
ndimidukforce-pushed the 25863-shade-jersey-javax.ws.rs branch from fee9e85 to f902b25CompareNovember 29, 2021 22:27
@ndimiduk
ndimiduk merged commit f9a7052 into apache:masterNov 29, 2021
@ndimiduk
ndimiduk deleted the 25863-shade-jersey-javax.ws.rs branch November 29, 2021 22:31
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Nov 30, 2021
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Nov 30, 2021
Adapt to the changes provided by apache/hbase-thirdparty#51
Signed-off-by: Andrew Purtell <apurtell@apache.org>
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Dec 9, 2021
Adapt to the changes provided by apache/hbase-thirdparty#51
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@ndimiduk@Apache-HBase@busbey@Apache9@apurtell