Skip to content

Commit

Permalink
Replace references to Datastax Java Driver
Browse files Browse the repository at this point in the history
by Java Driver for Apache Cassandra® following the transfer of the
codebase to Apache Software Foundation (CEP-8)
  • Loading branch information
maximevw committed Oct 28, 2023
1 parent 7f2ad2f commit ab289ea
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 36 deletions.
18 changes: 11 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Changed
- Deprecate the parameter `version` (CQL version) in JDBC URL because this one is purely informational and has no
effect. This will be removed in the next release.
- Replace references to "DataStax Java driver" by "Java Driver for Apache Cassandra®" following the transfer of the
codebase to Apache Software Foundation (see:
[IP clearance status](https://incubator.apache.org/ip-clearance/cassandra-java-driver.html) and
[CEP-8](https://cwiki.apache.org/confluence/x/5Y1rDQ))

## [4.10.1] - 2023-10-07
### Changed
Expand All @@ -29,7 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Implement the following methods of `CassandraDatabaseMetaData`:
`getBestRowIdentifier(String, String, String, int, boolean)` and `getAttributes(String, String, String, String)`.
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.17.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.17.0.
- Update Apache Commons IO to version 2.13.0.
- Update Apache Commons Lang to version 3.13.0.
- Update Jackson dependencies to version 2.15.2.
Expand Down Expand Up @@ -67,7 +71,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
`getUDTs(String, String, String, int[])`.
### Changed
- Harmonize the implementations of `Wrapper` interface.
- Rewrite the tests using Testcontainers with Apache Cassandra(R) 4.1.0 image.
- Rewrite the tests using Testcontainers with Apache Cassandra® 4.1.0 image.
- Modify the implementation of `setQueryTimeout(int)` and `getQueryTimeout()` in `CassandraStatement` to update the
request timeout on a specific statement.
### Removed
Expand All @@ -86,7 +90,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
`CassandraPreparedStatement` of `PreparedStatement` interface. It fixes the issue
[#19](https://github.com/adejanovski/cassandra-jdbc-wrapper/issues/19) of the [original project].
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.15.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.15.0.
- Fully implement methods from `Wrapper` interface for Cassandra connections, results sets and statements (see pull
request [#14](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/14)).
### Fixed
Expand All @@ -104,7 +108,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add an additional `CassandraConnection` constructor using a pre-existing session (see pull request
[#8](https://github.com/ing-bank/cassandra-jdbc-wrapper/pull/8)).
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.14.1.
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.1.

## [4.6.0] - 2022-03-20
### Added
Expand All @@ -114,7 +118,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add query parameter `requesttimeout` to specify a non-default timeout for queries.
See the feature request [#5](https://github.com/ing-bank/cassandra-jdbc-wrapper/discussions/5).
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.14.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.14.0.
- Update Apache Commons Lang to version 3.12.0.
### Removed
- Remove `cassandra-all` and `libthrift` dependencies to limit exposure to vulnerable libraries (see pull request
Expand All @@ -134,7 +138,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add codecs for conversions between `Integer` and CQL types `varint`, `smallint` and `tinyint`. It also fixes the issue
[#33](https://github.com/adejanovski/cassandra-jdbc-wrapper/issues/33) of the [original project].
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.10.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.10.0.
- Update `cassandra-all` to version 3.11.9.
- Improve documentation and code quality (refactoring, removing dead code, adding tests, ...).
- Improve the implementation of the metadata precision/size for the columns.
Expand All @@ -155,7 +159,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## 4.4.0 - 2020-12-23
For this version, the changelog lists the main changes comparatively to the latest version of the [original project].
### Changed
- Update DataStax Java Driver for Apache Cassandra(R) to version 4.9.0.
- Update DataStax Java Driver for Apache Cassandra® to version 4.9.0.
- Update `cassandra-all` to version 3.11.8.
- Force using `libthrift` 0.13.0 instead of the vulnerable version included into `cassandra-all`.
- Manage separately the type `LocalDate` in `CassandraResultSet`.
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Cassandra JDBC wrapper for the Datastax Java Driver
# JDBC wrapper of the Java Driver for Apache Cassandra®

[![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt)
![Build Status](https://img.shields.io/github/actions/workflow/status/ing-bank/cassandra-jdbc-wrapper/ci-workflow.yml)
[![Maven Central](https://img.shields.io/maven-central/v/com.ing.data/cassandra-jdbc-wrapper)](https://search.maven.org/search?q=g:com.ing.data%20AND%20cassandra-jdbc-wrapper)
[![Javadoc](https://javadoc.io/badge2/com.ing.data/cassandra-jdbc-wrapper/javadoc.svg)](https://javadoc.io/doc/com.ing.data/cassandra-jdbc-wrapper)

This is a JDBC wrapper of the DataStax Java Driver for Apache Cassandra (C*), which offers a simple JDBC compliant
This is a JDBC wrapper of the Java Driver for Apache Cassandra®, which offers a simple JDBC compliant
API to work with CQL3.

This JDBC wrapper is based on a fork of the project
Expand All @@ -27,8 +27,8 @@ The JDBC wrapper offers access to most of the core module features:

### Prerequisites

The wrapper uses DataStax Java driver for Apache Cassandra(R) 4.4.0 or greater. This driver is designed for Apache
Cassandra(R) 2.1+ and DataStax Enterprise (5.0+). So, it will throw "unsupported feature" exceptions if used against an
The wrapper uses Java Driver for Apache Cassandra® 4.4.0 or greater. This driver is designed for Apache
Cassandra® 2.1+ and DataStax Enterprise (5.0+). So, it will throw "unsupported feature" exceptions if used against an
older version of Cassandra cluster. For more information, please check the
[compatibility matrix](https://docs.datastax.com/en/driver-matrix/doc/driver_matrix/javaDrivers.html) and read the
[driver documentation](https://docs.datastax.com/en/developer/java-driver/latest/).
Expand Down Expand Up @@ -154,7 +154,7 @@ jdbc:cassandra://host1--host2--host3:9042/keyspace?requesttimeout=5000

### Specifying load balancing policies

In versions 4+ of DataStax Java driver for Apache Cassandra(R), the load balancing is defined with
In versions 4+ of Java Driver for Apache Cassandra®, the load balancing is defined with
`DefaultLoadBalancingPolicy` by default (see
[Load balancing](https://docs.datastax.com/en/developer/java-driver/latest/manual/core/load_balancing/) documentation).

Expand All @@ -174,7 +174,7 @@ The custom policy must implement `LoadBalancingPolicy` interface.

### Specifying retry policies

In versions 4+ of DataStax Java driver for Apache Cassandra(R), the retry policy is defined with `DefaultRetryPolicy` by
In versions 4+ of Java Driver for Apache Cassandra®, the retry policy is defined with `DefaultRetryPolicy` by
default (see [Retries](https://docs.datastax.com/en/developer/java-driver/latest/manual/core/retries/) documentation).

However, if you want to use a custom policy, add a `retry` argument to the JDBC URL and give the full package of the
Expand All @@ -187,7 +187,7 @@ The custom policy must implement `RetryPolicy` interface.

### Specifying reconnection policies

In versions 4+ of DataStax Java driver for Apache Cassandra(R), the reconnection policy is defined with
In versions 4+ of Java driver for Apache Cassandra®, the reconnection policy is defined with
`ExponentialReconnectionPolicy` by default (see
[Reconnection](https://docs.datastax.com/en/developer/java-driver/latest/manual/core/reconnection/) documentation).

Expand Down Expand Up @@ -528,8 +528,8 @@ To create a new `Tuple` object in Java (see
[Tuple](https://docs.datastax.com/en/developer/java-driver/latest/manual/core/tuples/) documentation), use the
`com.datastax.oss.driver.api.core.type.DataTypes.tupleOf(...).newValue()` method.
Note that the UDT ([User-Defined Types](https://docs.datastax.com/en/developer/java-driver/latest/manual/core/udts/))
fields cannot be instantiated outside the Datastax Java driver core. If you want to use prepared statements, you
must proceed as in the following example:
fields cannot be instantiated outside the Java Driver for Apache Cassandra® core. If you want to use prepared
statements, you must proceed as in the following example:
```java
public class HelloCassandra {
public void insertTuples(final Connection connection) {
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<packaging>jar</packaging>

<name>Cassandra JDBC Wrapper</name>
<description>JDBC wrapper of the DataStax Java Driver for Apache Cassandra.</description>
<description>JDBC wrapper of the Java Driver for Apache Cassandra®.</description>
<url>https://github.com/ing-bank/cassandra-jdbc-wrapper</url>
<inceptionYear>2020</inceptionYear>

Expand Down Expand Up @@ -110,7 +110,7 @@
<commons-collections.version>4.4</commons-collections.version>
<commons-io.version>2.14.0</commons-io.version>
<commons-lang3.version>3.13.0</commons-lang3.version>
<datastax.java.driver.version>4.17.0</datastax.java.driver.version>
<java.driver.version>4.17.0</java.driver.version>
<jackson.version>2.15.2</jackson.version>
<!-- Versions for test dependencies -->
<hamcrest.version>2.2</hamcrest.version>
Expand Down Expand Up @@ -138,7 +138,7 @@
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-core</artifactId>
<version>${datastax.java.driver.version}</version>
<version>${java.driver.version}</version>
</dependency>

<!-- Apache Commons Lang 3 -->
Expand Down Expand Up @@ -259,7 +259,7 @@
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-query-builder</artifactId>
<version>${datastax.java.driver.version}</version>
<version>${java.driver.version}</version>
<scope>test</scope>
</dependency>
<!-- Logging for tests -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@
*/
public class CassandraConnection extends AbstractConnection implements Connection {

// Minimal Apache Cassandra version supported by the DataStax Java Driver for Apache Cassandra on top which this
// wrapper is built.
// Minimal Apache Cassandra version supported by the Java Driver for Apache Cassandra® on top which this wrapper is
// built.
// If available, the effective version run by the node on which the connection is established will override these
// values.
/**
* Minimal Apache Cassandra major version supported by the DataStax Java Driver for Apache Cassandra.
* Minimal Apache Cassandra major version supported by the Java Driver for Apache Cassandra®.
*/
public static volatile int dbMajorVersion = 2;
/**
* Minimal Apache Cassandra minor version supported by the DataStax Java Driver for Apache Cassandra.
* Minimal Apache Cassandra minor version supported by the Java Driver for Apache Cassandra®.
*/
public static volatile int dbMinorVersion = 1;
/**
* Minimal Apache Cassandra patch version supported by the DataStax Java Driver for Apache Cassandra.
* Minimal Apache Cassandra patch version supported by the Java Driver for Apache Cassandra®.
*/
public static volatile int dbPatchVersion = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public ResultSet getClientInfoProperties() throws SQLException {
/**
* Retrieves a description of the access rights for a table's columns.
* <p>
* Datastax Java driver for Apache Cassandra(R) currently does not provide information about permissions and only
* Java Driver for Apache Cassandra® currently does not provide information about permissions and only
* super users can access to such information through {@code LIST ALL PERMISSIONS ON <tableName>}, so it cannot
* be implemented safely for any connection to the database, that's why this method will throw a
* {@link SQLFeatureNotSupportedException}.
Expand Down Expand Up @@ -266,8 +266,8 @@ public String getDatabaseProductName() {
/**
* Retrieves the version number of this database product.
* <p>
* The version number returned by this method is the minimal version of Apache Cassandra supported by this JDBC
* implementation (see Datastax Java driver version embedded into this JDBC wrapper and
* The version number returned by this method is the minimal version of Apache Cassandra® supported by this JDBC
* implementation (see Java Driver version embedded into this JDBC wrapper and
* <a href="https://docs.datastax.com/en/driver-matrix/doc/driver_matrix/javaDrivers.html">
* compatibility matrix</a> for further details.
* </p>
Expand Down Expand Up @@ -731,7 +731,7 @@ public String getSystemFunctions() throws SQLException {
/**
* Retrieves a description of the access rights for each table available in a catalog (Cassandra cluster).
* <p>
* Datastax Java driver for Apache Cassandra(R) currently does not provide information about permissions and only
* Java Driver for Apache Cassandra® currently does not provide information about permissions and only
* super users can access to such information through {@code LIST ALL PERMISSIONS ON <tableName>}, so it cannot
* be implemented safely for any connection to the database, that's why this method will throw a
* {@link SQLFeatureNotSupportedException}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,15 @@ public ResultSet executeQuery() throws SQLException {
* Language (DML) statement, such as {@code INSERT}, {@code UPDATE} or {@code DELETE}; or a CQL statement that
* returns nothing, such as a DDL statement.
*
* @return Always 0, for any statement. The rationale is that Datastax Java driver does not provide update count.
* @return Always 0, for any statement. The rationale is that Java Driver for Apache Cassandra® does not provide
* update count.
* @throws SQLException when something went wrong during the execution of the statement.
*/
@Override
public int executeUpdate() throws SQLException {
checkNotClosed();
doExecute();
// There is no updateCount available in Datastax Java driver, so return 0.
// There is no updateCount available in Java Driver for Apache Cassandra®, so return 0.
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class CassandraStatement extends AbstractStatement
*/
protected boolean escapeProcessing = true;
/**
* The Datastax Java driver statement.
* The Java Driver for Apache Cassandra® statement.
*/
protected com.datastax.oss.driver.api.core.cql.Statement<?> statement;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class Default extends AbstractOptionSet {

@Override
public String getCatalog() {
// It requires a query to table system.local since DataStax driver 4+.
// It requires a query to table system.local since Java Driver for Apache Cassandra® 4+.
// If the query fails, return null.
try (final Statement stmt = getConnection().createStatement()) {
final ResultSet rs = stmt.executeQuery("SELECT cluster_name FROM system.local");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public interface OptionSet {
String getCatalog();

/**
* There is no {@code updateCount} available in Datastax Java driver, different flavour requires different response.
* There is no {@code updateCount} available in Java Driver for Apache Cassandra®, different flavour requires
* different response.
*
* @return A predefined update response.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
*/

/**
* Implementation of JDBC API for Cassandra databases by wrapping the DataStax Java Driver for Apache Cassandra.
* Implementation of JDBC API for Cassandra databases by wrapping the Java Driver for Apache Cassandra®.
*/
package com.ing.data.cassandra.jdbc;
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public final class ErrorConstants {

/**
* Error message used in any SQL exception thrown because a {@code null} result set has been returned by the
* DataStax driver when a query is executed.
* Java Driver for Apache Cassandra® when a query is executed.
*/
public static final String NO_RESULT_SET =
"No ResultSet returned from the CQL statement passed in an 'executeQuery()' method.";
Expand Down

0 comments on commit ab289ea

Please sign in to comment.