helix
helix copied to clipboard
Upgrade from Java 8 to Java 11
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like Upgrade to Java 11
Additional context Java 11 is a LTS version from Oracle, and many large-scale web enterprises use it. As Helix grows and evolves to be more cloud-friendly, we want to adopt a Java version that's being used by public cloud providers.
Also, there has been a request from the open-source users in the past asking for Java 11 support.
Tagging the PMC: @kishoreg @lei-xia @dasahcc - what do you think? Any big objections?
Just saw this and wanted to add a few small comments/thoughts (and then I'll remove myself from this discussion since I know I'm not a core developer here):
There was just a very long discussion on the Zookeeper dev mailing list about this 2 months ago if it helps: https://mail-archives.apache.org/mod_mbox/zookeeper-dev/202010.mbox/browser
Are you thinking backward-incompatible Java 11 only (i.e. using features that are unavailable in Java 8)? Asking so I can be prepared to have some discussions since we currently default to Java 8 in my environment. Java 8 is still LTS until 2030 I think (https://en.wikipedia.org/wiki/Java_version_history), so maybe worth understanding how many Helix users are bound to that.
FWIW, I think as of https://github.com/apache/helix/pull/1424 Helix successfully builds on Java 11, though I've only done minimal testing.
Thanks for listening!
slowly backs out of discussion
Thanks for the input. It helps to know that there are users out there that build in JDK 8. At the moment, there are no plans to use Java features that are only available in Java 11.
I'll be sending an email to the helix-user mailing list. If we don't see a strong reason for the upgrade, we might hold off on this since Java 8 code will run under Java 11, 12 and further as they will be backward compatible.
Are jdks higher than 8 explicitly not supported? When trying to call HelixControllerMain.startHelixController
I can connect to zookeeper when using java 8, but when using for example jdk 17, I get the following exception:
14:27:39.838 [main-SendThread(localhost:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server localhost/<unresolved>:2181, unexpected error, closing socket connection and attempting reconnect
java.nio.channels.UnresolvedAddressException: null
at java.base/sun.nio.ch.Net.checkAddress(Net.java:149)
at java.base/sun.nio.ch.Net.checkAddress(Net.java:157)
at java.base/sun.nio.ch.SocketChannelImpl.checkRemote(SocketChannelImpl.java:816)
at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:839)
at org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:277)
at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:287)
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1021)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1064)
14:27:39.839 [main-SendThread(localhost:2181)] DEBUG org.apache.zookeeper.ClientCnxnSocketNIO - Ignoring exception during shutdown input
java.net.SocketException: Socket is not connected
at java.base/sun.nio.ch.Net.translateToSocketException(Net.java:181)
at java.base/sun.nio.ch.Net.translateException(Net.java:217)
at java.base/sun.nio.ch.Net.translateException(Net.java:223)
at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:392)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1250)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1174)
Caused by: java.nio.channels.NotYetConnectedException: null
at java.base/sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:1098)
at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:390)
... 3 common frames omitted
It was Java 11 now.