Skip to content

Conversation

@adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Jun 22, 2024

What changes were proposed in this pull request?

HttpFS fails to start when compiled by and for Java 17:

JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 \
  ./hadoop-ozone/dev-support/checks/build.sh -Djavac.version=17

Excerpt from HttpFS log:

java.lang.IllegalArgumentException
	at jersey.repackaged.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170)
	...
	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577)
	...
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:774)
	...
	at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:1301)
	at org.apache.ozone.fs.http.server.HttpFSServerWebServer.start(HttpFSServerWebServer.java:153)
	at org.apache.ozone.fs.http.server.HttpFSServerWebServer.main(HttpFSServerWebServer.java:185)
  1. Change HttpFS to use HttpServer2 from HDDS instead of Hadoop.
  2. Migrate HttpServer2 and HttpFS to Jersey 2, which Ozone already uses in S3 Gateway. Parts of this change are taken from [WIP] HADOOP-15984. Update jersey from 1.19 to 2.x hadoop#763, thanks @aajisaka, since these components were originally adapted from Hadoop.

https://issues.apache.org/jira/browse/HDDS-11052

How was this patch tested?

Compiled with and for Java 17:
https://github.com/adoroszlai/ozone/actions/runs/9741132878/job/26879699266#step:7:1

and ran HA-unsecure acceptance test, including HttpFS tests, with Java 17:
https://github.com/adoroszlai/ozone/actions/runs/9741132878/job/26880396757#step:6:1084

Regular CI:
https://github.com/adoroszlai/ozone/actions/runs/9746424125

@adoroszlai adoroszlai self-assigned this Jun 22, 2024
@adoroszlai adoroszlai marked this pull request as draft June 23, 2024 07:47
@adoroszlai adoroszlai marked this pull request as ready for review July 1, 2024 19:30
@adoroszlai adoroszlai changed the title HDDS-11052. HttpFS fails to start when compiled with Java 17 HDDS-11052. HttpFS fails to start when compiled for Java 17 Jul 1, 2024
Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

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

Thanks @adoroszlai . lgtm

@adoroszlai
Copy link
Contributor Author

@dombizita @fapifta would you like to take a look?

Copy link
Contributor

@dombizita dombizita left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @adoroszlai! I checked some basic functionalities with the HttpFS gateway in a docker cluster with your changes and they're working fine.

@adoroszlai adoroszlai merged commit 975a8d8 into apache:master Jul 10, 2024
@adoroszlai adoroszlai deleted the HDDS-11052 branch July 10, 2024 16:04
@adoroszlai
Copy link
Contributor Author

Thanks @dombizita, @smengcl for the review.

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.

3 participants