Skip to content

Conversation

@virajjasani
Copy link
Contributor

Description of PR

Discussion on HADOOP-18033

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 29s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The 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.
_ trunk Compile Tests _
+0 🆗 mvndep 15m 38s Maven dependency ordering for branch
+1 💚 mvninstall 26m 1s trunk passed
+1 💚 compile 26m 16s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 compile 23m 27s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 mvnsite 20m 18s trunk passed
-1 ❌ javadoc 2m 54s /branch-javadoc-root-jdkPrivateBuild-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.txt root in trunk failed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.
+1 💚 javadoc 8m 15s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 shadedclient 142m 25s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 46s Maven dependency ordering for patch
+1 💚 mvninstall 25m 45s the patch passed
+1 💚 compile 25m 26s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javac 25m 26s the patch passed
+1 💚 compile 23m 15s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 23m 15s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 19m 42s the patch passed
-1 ❌ javadoc 2m 44s /patch-javadoc-root-jdkPrivateBuild-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.txt root in the patch failed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.
+1 💚 javadoc 7m 52s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
-1 ❌ shadedclient 52m 23s patch has errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 851m 19s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 2m 38s The patch does not generate ASF License warnings.
1127m 34s
Reason Tests
Failed junit tests hadoop.cli.TestHDFSCLI
hadoop.tools.fedbalance.procedure.TestBalanceProcedureScheduler
hadoop.mapred.TestLocalDistributedCacheManager
hadoop.mapreduce.security.TestJHSSecurity
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4461/1/artifact/out/Dockerfile
GITHUB PR #4461
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux caca50253470 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 1e2a70bf48e2aab5c1aa830259b2a695562315db
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4461/1/testReport/
Max. process+thread count 3200 (vs. ulimit of 5500)
modules C: hadoop-client-modules/hadoop-client-runtime . U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4461/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 39s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The 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.
_ trunk Compile Tests _
+0 🆗 mvndep 15m 39s Maven dependency ordering for branch
+1 💚 mvninstall 25m 50s trunk passed
+1 💚 compile 26m 13s trunk passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 compile 23m 25s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 mvnsite 20m 25s trunk passed
-1 ❌ javadoc 2m 55s /branch-javadoc-root-jdkPrivateBuild-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.txt root in trunk failed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.
+1 💚 javadoc 8m 9s trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 shadedclient 142m 48s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 51s Maven dependency ordering for patch
+1 💚 mvninstall 25m 39s the patch passed
+1 💚 compile 25m 27s the patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚 javac 25m 27s the patch passed
+1 💚 compile 23m 15s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚 javac 23m 15s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 19m 51s the patch passed
-1 ❌ javadoc 2m 43s /patch-javadoc-root-jdkPrivateBuild-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.txt root in the patch failed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1.
+1 💚 javadoc 7m 57s the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
-1 ❌ shadedclient 52m 11s patch has errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 851m 0s /patch-unit-root.txt root in the patch passed.
+1 💚 asflicense 2m 34s The patch does not generate ASF License warnings.
1126m 25s
Reason Tests
Failed junit tests hadoop.cli.TestHDFSCLI
hadoop.mapred.TestLocalDistributedCacheManager
hadoop.mapreduce.security.TestJHSSecurity
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4461/4/artifact/out/Dockerfile
GITHUB PR #4461
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint
uname Linux f39ff20fdac3 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 1e2a70bf48e2aab5c1aa830259b2a695562315db
Default Java Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4461/4/testReport/
Max. process+thread count 3255 (vs. ulimit of 5500)
modules C: hadoop-client-modules/hadoop-client-runtime . U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4461/4/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani virajjasani changed the title HADOOP-18033. Remove shading exclusion of javax.ws.rs-api from hadoop-client-runtime HADOOP-18303. Remove shading exclusion of javax.ws.rs-api from hadoop-client-runtime Jun 19, 2022
Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

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

+1 pending my comments.

I'm confident that the javadoc failure is unrelated, are we all happy that the hdfs one is too?

pom.xml Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

cut this change; i want the most minimal backport possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, this was done just to trigger the full test run (and hence we see hdfs javadoc failure because all modules were involved in the build runs)

Copy link
Contributor

Choose a reason for hiding this comment

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

aah

@steveloughran
Copy link
Contributor

hdfs one is my fault :(

@virajjasani virajjasani force-pushed the javax.ws.rs-api-exclude branch from 1e2a70b to 3f6c6e0 Compare June 20, 2022 18:10
Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

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

Now we have both in shaded jar

[INFO] Including javax.ws.rs:javax.ws.rs-api:jar:2.1.1 in the shaded jar.
[INFO] Including javax.ws.rs:jsr311-api:jar:1.1.1 in the shaded jar.

Both have couple of exactly same classes like
for UriBuilder

ayushsaxena@ayushsaxena-MBP16 hadoop % jar tf ~/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.jar | grep UriBuilder.class
javax/ws/rs/core/UriBuilder.class
ayushsaxena@ayushsaxena-MBP16 hadoop % jar tf ~/.m2/repository/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar | grep UriBuilder.class
javax/ws/rs/core/UriBuilder.class

But in the shaded jar there is only one UriBuilder.class

ayushsaxena@ayushsaxena-MBP16 target % jar tf hadoop-client-runtime-3.4.0-SNAPSHOT.jar | grep UriBuilder.class                                
org/apache/hadoop/shaded/javax/ws/rs/core/UriBuilder.class

It is overwriting one on top of other, may be the one which comes last stays....

@steveloughran
Copy link
Contributor

i wouldn't trust the ordering of the merge. could one jar be excluded explicitly.

I'm getting really confused now. Before this PR, conflicting imports were both being shaded. Now they are being merged in unshaded and the issue is which ones not to shade?

@apache apache deleted a comment from hadoop-yetus Jun 21, 2022
@apache apache deleted a comment from hadoop-yetus Jun 21, 2022
@apache apache deleted a comment from hadoop-yetus Jun 21, 2022
@ayushtkn
Copy link
Member

ayushtkn commented Jun 21, 2022

I'm getting really confused now. Before this PR, conflicting imports were both being shaded. Now they are being merged in unshaded and the issue is which ones not to shade?

I am also confused....

No, one was shaded one wasn't, the one not shaded is getting added here because kirby & spark are crying due to missing classes.

The question is yes which one to shade and which one not to, In Ideal situation only one of these jars should be there because they provide similar classes and to be used by different version.

In our case Jackson use the new Jar, and Jersey uses the old Jar, so we need both Jar in hadoop. If we upgrade Jersey also, both Jackson & Jersey will need the new jar and we can remove one jar and this conflict.

Let us assume we did something with the shading, but Projects like Tez, when they add Hadoop as dependency they get both Jars and both have similar classes, so that creates a mess, something similar error message like here:
https://stackoverflow.com/questions/23277429/java-lang-abstractmethoderror-javax-ws-rs-core-uribuilder-uri/26767488#26767488

Regarding Solution: I don't have a perfect solution, and definitely need pointers, Not sure what we can do with shading, if we figure out may be spark/kriby may be happy. But if we exclude the old jar who will be unhappy god knows....

Shading won't solve Hive/Tez issue....

Jersey upgrade: Not sure we can do for a maintenance release, people have objections for protobuf as well, and post that also I guess downstream also have to upgrade Jersey, that won't be easy either.

That is all what I know or can think of, Not sure what all is Right/Wrong.

Hope I didn't contribute more to the confusion, if I did Please read the first line. :-)

@steveloughran
Copy link
Contributor

kirby & spark are crying due to missing classes.

so why aren't they explicitly asking for the jars? or are some bits of our code are still asking for things by their unshaded classnames?

@ayushtkn
Copy link
Member

@pan3793 might be good to answer the kyuubi & spark issue is flagged by him here:
#3764 (comment)
and some details here:
https://issues.apache.org/jira/browse/HADOOP-18033?focusedCommentId=17555953&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17555953

@pan3793 can you please share some more details on that...

@apache apache deleted a comment from hadoop-yetus Jun 22, 2022
@sunchao
Copy link
Member

sunchao commented Jun 22, 2022

In this case, the problematic class is org.apache.hadoop.shaded.javax.ws.rs.core.NoContentException which is only in javax.ws.rs:javax.ws.rs-api:jar and is not shaded before this PR, and hence the exception.

Let us assume we did something with the shading, but Projects like Tez, when they add Hadoop as dependency they get both Jars and both have similar classes, so that creates a mess, something similar error message like here ...

Hmm why is that? does Hive/Tez use shaded Hadoop client? the shading also comes with relocation so that it shouldn't interfere with the other dependencies.

@ayushtkn
Copy link
Member

@sunchao It doesn't, that is what I was saying, even if we sort the shading issue, the Tez issue is gonna stay because it doesn't use the shaded Jar and gets both these jars in classpath and things mess up.
Can check the exception in the end here:
https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-213/4/testReport/org.apache.tez.history/TestHistoryParser/testParserWithFailedJob/

@pan3793
Copy link
Member

pan3793 commented Jun 22, 2022

Looks like upgrading jersey to get rid of jsr311-api is the only solution then.

@steveloughran
Copy link
Contributor

steveloughran commented Jun 22, 2022

Looks like upgrading jersey to get rid of jsr311-api is the only solution then.

ok, but then no aspects of jersey 2 must be unshaded or every project which still uses 1.19 is going to break. we don't want to do that

@sunchao
Copy link
Member

sunchao commented Jun 23, 2022

@sunchao It doesn't, that is what I was saying, even if we sort the shading issue, the Tez issue is gonna stay because it doesn't use the shaded Jar and gets both these jars in classpath and things mess up.

I see. This looks like a separate issue from this PR, is that correct? is this because of https://issues.apache.org/jira/browse/HADOOP-18033?

The issue seems tricky though. I wonder if we can shade jersey 2 in hadoop-thirdparty and then update Hadoop to use that.

@ayushtkn
Copy link
Member

ayushtkn commented Jun 23, 2022

Both shading and the issue that I am talking about are due to HADOOP-18033
Jackson upgrade added a rs-api jar which is not shaded and it is the same jar whoch causes conflicts in Tez with jsr311 jar already present

@sunchao
Copy link
Member

sunchao commented Jun 23, 2022

In that case should we consider reverting it for now until we are ready to upgrade both jersey and jackson together at some point?

@ayushtkn
Copy link
Member

Yeps, if people let us do that, that jira is already in a released version

@virajjasani
Copy link
Contributor Author

While HADOOP-18033 is released in 3.3.2, HADOOP-18178 has also made it's way to 3.3.3.

@virajjasani
Copy link
Contributor Author

Even if HADOOP-18033 had not excluded javax.ws.rs-api from shading, as mentioned here, we would have anyways caused subtle problems by having only one version of common class in the final client jar (as opposed to having different classes for both javax.ws.rs-api and jsr311-api).

@sbhatm1213
Copy link

I'm still facing the issue
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.shaded.javax.ws.rs.core.NoContentException

I was using Hadoop 3.1.1 . Now installed Hadoop 3.3.3. Still getting the problem.

@ayushtkn
Copy link
Member

Try with 3.3.4, we fixed it there If I remember correctly

Sign up for free to 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.

7 participants