[
https://issues.apache.org/jira/browse/CASSANDRA-9608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302620#comment-16302620
]
Eduard Tudenhoefner commented on CASSANDRA-9608:
------------------------------------------------
Env used for review:
{code}
--- ~ » uname -or
4.9.68-1-MANJARO GNU/Linux
{code}
JDK 8: *1.8.0_152-b16*
JDK 9: *9.0.1+11*
I did a review of the code and the code changes LGTM. I compiled the build both
with JDK 8 and JDK 9 and things were working.
I also looked at different C* online/offline tools and didn't experience any
particular issues.
[~snazy] should we mention somewhere that a newer *Ant* version is required?
Overall, *+1* from my side.
The below stuff is mostly informative and something we should look at in the
future, since it's out of scope of this ticket.
{code}
JDEPS
==================================================
--- workspace/cassandra ‹jdk9› » jdeps -jdkinternals .
. -> /usr/lib/jvm/java-8-jdk/jre/lib/rt.jar
org.apache.cassandra.io.util.FileUtils (.)
-> sun.nio.ch.DirectBuffer JDK internal API
(rt.jar)
org.apache.cassandra.io.util.Memory (.)
-> sun.misc.Unsafe JDK internal API
(rt.jar)
-> sun.nio.ch.DirectBuffer JDK internal API
(rt.jar)
org.apache.cassandra.utils.FastByteOperations$UnsafeOperations (.)
-> sun.misc.Unsafe JDK internal API
(rt.jar)
org.apache.cassandra.utils.FastByteOperations$UnsafeOperations$1 (.)
-> sun.misc.Unsafe JDK internal API
(rt.jar)
org.apache.cassandra.utils.JMXServerUtils$ExporterImpl (.)
-> sun.rmi.server.UnicastServerRef2 JDK internal API
(rt.jar)
org.apache.cassandra.utils.JMXServerUtils$JMXPluggableAuthenticatorWrapper
(.)
-> com.sun.jmx.remote.security.JMXPluggableAuthenticator JDK internal API
(rt.jar)
org.apache.cassandra.utils.JMXServerUtils$Registry (.)
-> sun.rmi.registry.RegistryImpl JDK internal API
(rt.jar)
org.apache.cassandra.utils.NativeLibrary (.)
-> sun.nio.ch.FileChannelImpl JDK internal API
(rt.jar)
org.apache.cassandra.utils.memory.MemoryUtil (.)
-> sun.misc.Unsafe JDK internal API
(rt.jar)
-> sun.nio.ch.DirectBuffer JDK internal API
(rt.jar)
Warning: JDK internal APIs are unsupported and private to JDK implementation
that are
subject to be removed or changed incompatibly and could break your application.
Please modify your code to eliminate dependency on any JDK internal APIs.
For the most recent update on JDK internal API replacements, please check:
https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
JDK Internal API Suggested Replacement
---------------- ---------------------
sun.misc.Unsafe
{code}
A bunch of warnings when using C* and/or tools. This is out of scope of this
ticket, but something that should be looked at in the future.
{code}
C* startup warnings
==================
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.cassandra.utils.FBUtilities
(file:/.../build/classes/main/) to field java.io.FileDescriptor.fd
WARNING: Please consider reporting this to the maintainers of
org.apache.cassandra.utils.FBUtilities
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
Warnings: cassandra-stress & other tools
==========================
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by
com.datastax.shaded.netty.util.internal.PlatformDependent0
(file:/.../lib/cassandra-driver-core-3.0.1-shaded.jar) to field
java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of
com.datastax.shaded.netty.util.internal.PlatformDependent0
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
Warnings: debug-cql
===================
CQL binary protocol console 127.0.0.1@7199 using native protocol version 4/v4
Connecting...WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil
(file:/.../lib/netty-all-4.1.14.Final.jar) to constructor
java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of
io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
{code}
> Support Java 9
> --------------
>
> Key: CASSANDRA-9608
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9608
> Project: Cassandra
> Issue Type: Task
> Reporter: Robert Stupp
> Assignee: Robert Stupp
> Priority: Minor
>
> This ticket is intended to group all issues found to support Java 9 in the
> future.
> From what I've found out so far:
> * Maven dependency {{com.sun:tools:jar:0}} via cobertura cannot be resolved.
> It can be easily solved using this patch:
> {code}
> - <dependency groupId="net.sourceforge.cobertura"
> artifactId="cobertura"/>
> + <dependency groupId="net.sourceforge.cobertura"
> artifactId="cobertura">
> + <exclusion groupId="com.sun" artifactId="tools"/>
> + </dependency>
> {code}
> * Another issue is that {{sun.misc.Unsafe}} no longer contains the methods
> {{monitorEnter}} + {{monitorExit}}. These methods are used by
> {{o.a.c.utils.concurrent.Locks}} which is only used by
> {{o.a.c.db.AtomicBTreeColumns}}.
> I don't mind to start working on this yet since Java 9 is in a too early
> development phase.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]