You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Stupp (JIRA)" <ji...@apache.org> on 2016/08/02 16:07:21 UTC

[jira] [Commented] (CASSANDRA-9608) Support Java 9

    [ https://issues.apache.org/jira/browse/CASSANDRA-9608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15404262#comment-15404262 ] 

Robert Stupp commented on CASSANDRA-9608:
-----------------------------------------

There's a potential blocker for us in Java9:
We rely on {{sun.nio.ch.DirectBuffer.cleaner().clean()}} to free memory mapped files (and also off heap memory, but that's handled in a different ticket).
{{DirectBuffer.cleaner()}} before Java 9 is returns a {{sun.misc.Cleaner}}, but Java 9 returns {{jdk.internal.ref.Cleaner}} - this makes it very hard to maintain Java 8 and Java 9 compatibility. We have to use this ugly thing, because we do not want to want for some garbage collection to occur to free mmap'd regions or free off heap memory.

> Support Java 9
> --------------
>
>                 Key: CASSANDRA-9608
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9608
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: 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.3.4#6332)