hadoop icon indicating copy to clipboard operation
hadoop copied to clipboard

Javax -> Jakarta || Jersey 1.x -> 3.x

Open avperillo opened this issue 1 year ago • 11 comments

Description of PR

The intention of this PR is to explore the possibility of migrating to Jakarta and to identify which other dependencies need to be migrated as well.

Currently, I've found these:

  • Jersey 1.19 -> 3.x. Jersey 2 is not Jakarta compatible.
  • Jetty 9.4.53.v20231009 -> 10 or 11 ¿? (11 It seems to be incompatible with java 1.8)
  • ehcache¿? -> it has some javax transitive dependencies.

How was this patch tested?

For code changes:

  • [ ] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • [ ] If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

avperillo avatar Oct 25 '24 11:10 avperillo

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 0s Docker mode activated.
-1 :x: patch 0m 15s https://github.com/apache/hadoop/pull/7130 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7130/1/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 25 '24 11:10 hadoop-yetus

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 0s Docker mode activated.
-1 :x: patch 0m 14s https://github.com/apache/hadoop/pull/7130 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7130/2/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 25 '24 12:10 hadoop-yetus

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 0s Docker mode activated.
-1 :x: patch 0m 16s https://github.com/apache/hadoop/pull/7130 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7130/3/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 25 '24 12:10 hadoop-yetus

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 0s Docker mode activated.
-1 :x: patch 0m 15s https://github.com/apache/hadoop/pull/7130 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7130/4/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 25 '24 12:10 hadoop-yetus

This should be discussed via a JIRA in issues.apache.org. There is already https://issues.apache.org/jira/browse/HADOOP-15984

pjfanning avatar Oct 26 '24 21:10 pjfanning

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 0s Docker mode activated.
-1 :x: patch 0m 18s https://github.com/apache/hadoop/pull/7130 does not apply to trunk. Rebase required? Wrong Branch? See https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute for help.
Subsystem Report/Notes
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7130/5/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 28 '24 08:10 hadoop-yetus

I am not going to be able to review this as it needs people from the hdfs and yarn teams, who services deploy the web servers.

That's a quick glance though:

  • pom.xml-wise: declare the versions of artifacts in hadoop-project/pom.xml; sub-projects projects must not
  • the move off javax.annotations.@Nullable seems unneeded to me. Why are you doing it? the current one is in findbugs and there shouldn't be any problems with it.

If it is impossible to use the current nullable annotation, then we should have our own in hadoop-annotations. That way: we do not need to add Jakarta dependencies onto projects which I've never needed them before, and isolated from future changes. This and should be done independently of the Jakarta move. But I note: I don't think we need it.

steveloughran avatar Oct 28 '24 13:10 steveloughran

Hi @steveloughran and thanks for the review.

In fisrt place, sorry if I don’t follow the common path in trying to help with this project.

Yes, exactly, I will move the versions to the main pom. This is because I used Openrewrite to quickly migrate the dependencies to Jakarta. My intention is to see if it's possible to move to Jakarta and to discover which dependencies needs to be moved as well.

I moved from the javax.annotation.nonnull import to jakarta.annotation.nonull beacause it was already in javax, and I need to move on jakarta. If this annotation cause some problems, I don´t mid removing it

The main reason for this initiative and move to Jakarta is because of the use of Hadoop libs in other projects that needs to move on Jakarta. For example:

  • https://issues.apache.org/jira/browse/RANGER-4038

avperillo avatar Oct 29 '24 09:10 avperillo

thanks for the update.

There's a jersey 2 pr right now, #7019, which is also patching the CI build in some way.

I think that one needs to go in first, with jackson support coming in later. It would probably be a good think to be a bit ore proactive, but openrewrite seems to have restricted itself to the remapping of imports other than the rest of the complexity.

Before worrying about that work then, adding and moving to our own Nullable/NotNullable etc would be good, and can be done component by component. We did it for @VisibleForTesting a while back, as well as other Guava stuff (preconditions, rate limiting,...). essentially: anything with a public api MUST NOT use third party libraries as part of the API.

steveloughran avatar Oct 29 '24 11:10 steveloughran

Close this PR until the initiative to migrate to Jersey 2.x is resolved.

Thank you for everything @steveloughran, I will consider your suggestion.

avperillo avatar Oct 30 '24 13:10 avperillo

as 7019 got merged, reopening this PR... would you like to continue on this work @avperillo ?

hemanthboyina avatar Jun 16 '25 04:06 hemanthboyina

Created a jira to discuss on this: HADOOP-19625

Could you please provide your inputs @steveloughran @pjfanning @avperillo ?

eshwitha avatar Jul 15 '25 17:07 eshwitha

We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again. Thanks all for your contribution.

github-actions[bot] avatar Oct 24 '25 00:10 github-actions[bot]