Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Cassandra support Java 10?

We're planning on migrating our environment from Java 8 to OpenJDK 10. Doing this on my local machine, I've found that Cassandra will no longer start for me, giving the following error :

enter image description here

I can't find any solid information online that says it is definitely not supported.

This post from 4 months ago suggests that they do not support Java 10, but doesn't say it is confirmed, and is more inferred. There is also a comment on it from another user saying they have managed to get it running on Java 11.

The final comment on this ticket on datastax says "We've updated our CI matrix to include Java 10 and everything works except for the aforementioned OSGi testing issues." I'm not sure what to take away from that, but it seems to imply that it is working with Java 10 now, as the ticket is marked as resolved.

This ticket, they discuss support for Java 11. There are a few comments discussing the need to even support Java 10, but they don't really give a definitive answer on whether they will or not.

Finally this blog discusses a way to get Java 11 working with cassandra. However I notice this is using Cassandra 4.0. Has this officially been released? I notice on their website they say the release date is tbd and says the current stable release is 3.11.3, and there is no mention of it on their compatibility page.

I currently installed Cassandra on windows via Datastax, but I have also tried cloning the current git repository and running it from there, but I get the same error message (although on their github they do seem to say it has only been tested with Java 8).

Do they simply not support 10 then? Also if anyone knows if they plan to release 4.0 soon, and if that will definitely support 11 (and I assume 10 ?), that would be a massive help.

like image 652
user3275784 Avatar asked Sep 14 '18 15:09

user3275784


People also ask

What version of Java does Cassandra use?

Apache Cassandra 4.0 gets built with Java 8.

What is Cassandra DataStax?

Apache Cassandra® is the only distributed NoSQL database that delivers the always-on availability, blisteringly fast read-write performance, and unlimited linear scalability needed to meet the demands of successful modern applications.

How do I know what version of Cassandra I have?

Provides the version number of Cassandra running on the specified node. Provides the version number of Cassandra running on the specified node.

What is Cassandra driver?

A modern, feature-rich and highly-tunable Python client library for Apache Cassandra (2.1+) and DataStax Enterprise (4.7+) using exclusively Cassandra's binary protocol and Cassandra Query Language v3. The driver supports Python 2.7, 3.5, 3.6, 3.7 and 3.8.


1 Answers

With Cassandra 3.11.4 we have been able to execute the Cassandra engine with Java 11, but there has been some gotchas:

  • If for any reason you are still using CMS for garbage collection, it would be the time to move to G1; this is set up in the jvm.options file.
  • Also in jvm.options, you will need to disable the ThreadPriorityPolicy as it was deprecated with Java 9
  • With the unified logging of gc activity, introduced with Java 9, you will need to remove gc specific parameters in jvm.options. Some of those parameters are:
    • -Xloggc
    • -XX:+PrintGCDetails
    • -XX:+PrintGCDateStamps
    • -XX:+PrintHeapAtGC
    • -XX:+PrintTenuringDistribution
    • -XX:+PrintGCApplicationStoppedTime
    • -XX:+PrintPromotionFailure
  • nodetool still requires Java 8 to be able to execute.

    • We have both JVM installed, and used alternatives to set Java 11 as the default. This is also the value of the JAVA_HOME variable
    • We have a new variable called JAVA8_HOME that points to that version
    • We updated the nodetool script (in our case it was in /usr/bin/nodetool) to use JAVA8_HOME when setting the JAVA variable
  • For a cluster that was using offheap_buffers for memtable_allocation_type (it is defined in cassandra.yaml), we had to change it to use offheap_objects

like image 58
Carlos Monroy Nieblas Avatar answered Oct 28 '22 13:10

Carlos Monroy Nieblas