The Java driver team is pleased to announce that version 3.2.0 of the DataStax Java driver for Apache Cassandra® has just been released.
We would like to stress that this release has been made possible thanks to a strong and vibrant community involvement. Our team and our company are thankful to all of you that contributed, directly or indirectly, to make our driver even better, with a special shout-out to 3 Github users: @avivcarmis
In this post, we will focus on the most significant changes brought by this new release; you can also consult the fullchangelog and ourupgrade guide for details about how to migrate existing applications.
Performance and Usability Enhancements
This release is the first one to provide full compatibility
with recent Guava versions up to 21.0 inclusive. By default, the driver now uses version 19.0, but any version from 16.0.1 to 21.0 can be used.
According to our internal benchmarks, this version is also noticeably faster than any previous version in the 3.x series thanks to a few performance improvements, among which the performance boost
in acore component of the driver. Users are strongly encouraged to migrate to 3.2.0 as soon as possible to benefit from these.
Enhanced SSL options
interface does not allow implementors to perform hostname verification. Thanks to JAVA-1364
, this is now possible, using the newly-introduced
sub-interface, that exposes anew method giving implementors access to the remote endpoint address.
This new sub-interface comes with two new concrete implementations:
. Note that the old
interface and its direct implementations are now deprecated. Read more about SSL configuration in ouronline documentation.
This release brings substantial enhancements to the driver’sobject mapper; thanks to JAVA-1310
, users can now customize certain aspects of the mapping process itself by defining strategies
For example, by default the mapper tries to map all the properties found in your Java data model. You might want to take an “opt-in” approach instead and only map the ones that are explicitly annotated with
; this is now possible thanks to adedicated strategy. Similarly, you might want to tell the mapper to ignore certain parent classes in your class hierarchy; this is also made possible byanother strategy.
Another common need is to customize the way Cassandra column names are inferred. Out of the box, Java property names are simply lowercased: a
Java property is mapped to the
column. It is now possible to map it to something else instead, e.g.
, by simply configuring therelevant strategy.
Strategies can be supplied through a new class,
. Read more about the object mapper configuration in ouronline documentation.
Support for the
This release also brings full support
for the new CQL
type. This type has been introduced
in Apache Cassandra® 3.10, and although its primary purpose is to be used in CQL statements to specify either restrictions
WHERE time < now() + 2h
– or aggregations
GROUP BY floor(time, 2h)
–, it can also be used as a regular CQL type. The driver now supports such a usage through the new
class (however, there are no dedicated methods for it in the
interface nor in the
class; users are expected to set and retrieve
instances through the generic
Getting the driver
As always, the driver is available fromMavenand from our downloads server.
We’re also running a platform and runtime survey
to improve our testing infrastructure. Your feedback would be most appreciated.