Recommended Datastax Drivers version to connect to Cassandra Version 4.0 - cassandra

Currently we are using Java Datastax Drivers Version 3.7.2 to connect to Open source Apache Cassandra Version 3.11.9.
We are planning on to upgrade to Open Source Apache Cassandra Version 4 , Can someone please let me know what are the recommended Java Datastax Drivers version to connect to Cassandra Version 4. I see in this article Datastax had mentioned that Datastax Drivers Version 3.11 is partially compatible with Cassandra Version 4.X and did not have much information on what they mean about partially compatible? 
https://docs.datastax.com/en/driver-matrix/docs/java-drivers.html

First, Apache Cassandra® 4.1 is already released last Dec and you may want to look at upgrading to that as opposed to 4.0.x.
Next, partially compatible is also explained in the docs section as,
^4^ Limited to the Cassandra 3.x and 2.2.x API.
Also, I'm taking excerpts from the mailing list discussions here.
Neither the 4.x nor the 3.x Java drivers are in maintenance mode at the moment. It is very much true that any new Java driver features will be developed on the 4.x branch and in general will not be ported to 3.x. 3.x will continue to receive CVE and other critical bug fixes but as mentioned there are no plans for this branch to receive any new features. It's not completely impossible that a specific feature or two might make it's way to 3.x on a case-by-case basis but if you're planning for the future with 3.x you should do so with the expectation that it will receive no new features.
&
Having said that, I would strongly recommend and encourage you to upgrade to the 3.11.3 version of the java driver (released on Sep 20, 2022) which is directly binary compatible with the version that you're using today, 3.7.2 (released on Jul 10, 2019), to leverage features and fixes (including many CVE patches). In addition, I would also suggest you to sketch out a plan to upgrade your apps to 4.x driver or look into modernizing to interact with your Apache Cassandra®/DSE®/Astra DB® cluster via the Stargate® APIs.

Related

Is Java driver v3.6 compatible with Cassandra 4.x?

I am writing to check the check the compatibility of Datastax cassandra-driver-core 3.6 for working with Cassandra Version 4.
Could you please suggest.
below is the dependency currently being used, Checking if same dependency will work for Cassandra version 4.0
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.6.0</version>
I did refer this post, which says it is compatible. However, it dint work out for me. If you may comment for the support part to check further
Apache Cassandra 4.x java driver compatibility
I managed to install cassandra 4x using the same cassandra 3.11 driver
Below steps to make it work:
Download and Install cassandra-4.0.5-1.noarch.rpm from https://downloads.apache.org/cassandra/redhat/40x/
Configure cassandra.yaml file per the existing cluster cassandra.yaml file.
Below parameters, if exists, need to be removed/commented from Cassandra.yaml as its not supported by cassandra4.X version
a. start_rpc
b. rpc_server_type
c. rpc_port
d. thrift_framed_transport_size_in_mb
e. request_scheduler
f. thrift_prepared_statements_cache_size_mb
Note: If using rhel and cassandra-4.0.5-1.noarch.rpm is failing with yum command, try using cassandra-4.0.4-1.noarch.rpm which works fine.
Version 3.6 of the Java driver is compatible with Apache Cassandra 4.0 but there are additional steps required to make it work.
Cassandra 4.0 operates with native protocol v5 (CASSANDRA-9362, CASSANDRA-14973) but Java driver v3.6 supports up to native protocol v3 only (C* 2.2, 3.x). In order to connect to a C* 4.0 cluster, you will need to configure Java driver v3.6 to explicitly use protocol v3. For example:
Cluster cluster = Cluster.builder()
.addContactPoint(contactpoint)
.withProtocolVersion(ProtocolVersion.V3)
.build();
As a side note, v3.6 of the driver was released in 2018 and is very old. We recommend that you upgrade to the latest v3.x version of the Java driver which at the time of writing is v3.11. Since it is just an upgrade to the latest patch release, it is binary compatible with v3.6 and does not require a refactor of your application. Cheers!

Apache Cassandra 4.x java driver compatibility

Want to upgrade Cassandra from 3.3 to 4.0.6. The database is used by Java applications that are running the Datastax driver 3.2 and some using the Dropwizard cassandra driver version 4.0.
Will I have to update the Java applications as part of the upgrade ? Or is Cassandra 4.0.6 backward compatible ?
Cassandra 4.0 is backwards compatible with older protocol versions (3 and 4). If you were able to connect to a Cassandra cluster running 3.X with your application, you should be able to connect to a 4.0 cluster.
As long as you are using some version of datastax java-driver 3.0 or later, you should be able to continue using the same versions of client libraries you are already using.
That being said, 3.2 is a fairly old version. You may what to consider upgrading to the latest 3.X datastax java driver or look at the 4.X java driver (which is a complete rewrite and would require more code changes).

cassandra version compatibility with 3.7?

Is the spring-data-cassandra version 1.4.2 compatible with cassandra version 3.7? I get the following error when I try to connect:
Error creating bean with name 'cassandraSession': Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError:
io/netty/util/concurrent/EventExecutor
No, Spring Data Cassandra 1.4.x is based on the 2.x DataStax's Cassandra driver.
However, in Spring Data Cassandra 1.5 (Ingalls) release series (currently at 1.5 M1), we have upgraded the DataStax Cassandra driver to 3.0.3. We have also removed support for the DataStax DSE (DataStax Enterprise) driver since it is unnecessary for SD Cassandra functionality.
There were significant changes in the 3.0 version of DataStax's Java driver API requiring us to introduce 3.0 support in 1.5. We would not be able to back port these changes without adversely affecting 1.4 users.
You can find out more by reading our SD Ingalls M1 release announcement.
Also, you can follow the development of SD Cassandra 1.5 on the Wiki.
Feedback is always welcomed, either with PRs or through JIRA.

Which Apache cassandra version to use for production

We are exploring apache cassandra and are going to use it for Production soon.
We are going to use mostly Datastax community edition of apache cassandra.
But after reading :
http://www.planetcassandra.org/blog/cassandra-2-2-3-0-and-beyond/
https://www.pythian.com/blog/cassandra-version-production/
With this sentence from above blog “If you don’t mind facing serious bugs and contribute to the development pick 3.x”
I am confused about which version to opt for our production deployment ?
Just need to know whether 3.5.0 and 3.0.6 are production ready.
Datastax community : 3.5.0 from http://www.planetcassandra.org/cassandra/
Datastax community : 3.0.6 from
http://www.planetcassandra.org/archived-versions-of-datastaxs-distribution-of-apache-cassandra/
or
Datastax community : 2.2.6 from
http://www.planetcassandra.org/archived-versions-of-datastaxs-distribution-of-apache-cassandra/
The version provided by datastax is supposed to be stable and production ready. You have an application to monitor your cluster, which is nice if you don't have any ops that knows about cassandra in the first place, and you can pay to get support.
However, you don't have the latest version of Cassandra, and you can miss interesting features.
As for Cassandra 3.x, as said above, you get more features (for example JSON support) and better performance, but if you find a critical bug and can't fix it, you can only writes a ticket and hope they will take care of it quickly. Yet it is production ready and this could work well for you.
In conclusion, go for the latest version only if you need a special feature, or if you have the developers in your team to back your choice. Go for Datastax if you want something that works with less effort.

Spring-data-cassandra framework support for Cassandra java driver 3.0 and server 3.x

I am using Spring-data-cassandra framework to perform cassandra related operations. Now that I have to move the C* server to 3.4. This is forcing me to use cassandra java driver 3.0. However what is noticed is the spring-data-cassandra latest version 1.4.Release does not support C* java driver 3.0 yet.
Can anyone on this group update with the details on when the support would be available for java driver 3.x.
Also here is the link to JIRA issue.
Thanks

Resources