Does Cassandra support Java 10?

前端 未结 4 605
闹比i
闹比i 2020-12-17 17:11

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 fo

4条回答
  •  青春惊慌失措
    2020-12-17 17:49

    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

提交回复
热议问题