DataStax Java Driver: 3.2.0 released!

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
, @wimtie
and @gnoremac
.

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

The current
SSLOptions

interface does not allow implementors to perform hostname verification. Thanks to JAVA-1364
, this is now possible, using the newly-introduced
RemoteEndpointAwareSSLOptions

sub-interface, that exposes anew method giving implementors access to the remote endpoint address.

This new sub-interface comes with two new concrete implementations:
RemoteEndpointAwareJdkSSLOptions

and
RemoteEndpointAwareNettySSLOptions

. Note that the old SSLOptions
interface and its direct implementations are now deprecated. Read more about SSL configuration in ouronline documentation.

Mapper Configuration

This release brings substantial enhancements to the driver’sobject mapper; thanks to JAVA-1310
and JAVA-1316
, 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
@Column

or
@Field

; 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 userName
Java property is mapped to the username
column. It is now possible to map it to something else instead, e.g. user_name
or USERNAME
, by simply configuring therelevant strategy.

Strategies can be supplied through a new class,
MappingConfiguration

. Read more about the object mapper configuration in ouronline documentation.

Support for the duration
type

This release also brings full support
for the new CQL duration
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
– e.g. WHERE time < now() + 2h
– or aggregations
– e.g. 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
Duration

class (however, there are no dedicated methods for it in the
Row

interface nor in the
BoundStatement

class; users are expected to set and retrieve Duration
instances through the generic
get()

and
set()

methods).

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.

DataStax稿源:DataStax (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合技术 » DataStax Java Driver: 3.2.0 released!

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录

登录

忘记密码 ?

切换登录

注册