diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 00000000000..ac29efed9ff
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+notifications:
+ commits: commits@cassandra.apache.org
+ issues: commits@cassandra.apache.org
+ pullrequests: pr@cassandra.apache.org
+ jira_options: link worklog
+
+github:
+ description: "Java Driver for Apache Cassandra®"
+ homepage: https://cassandra.apache.org/
+ enabled_merge_buttons:
+ squash: false
+ merge: false
+ rebase: true
+ features:
+ wiki: false
+ issues: false
+ projects: false
+ autolink_jira:
+ - CASSANDRA
+ - CASSJAVA
diff --git a/.github/workflows/dep-lic-scan.yaml b/.github/workflows/dep-lic-scan.yaml
deleted file mode 100644
index afb197bf137..00000000000
--- a/.github/workflows/dep-lic-scan.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Dependency and License Scan
-on:
- push:
- branches:
- - '4.x'
- - '3.x'
- paths-ignore:
- - 'manual/**'
- - 'faq/**'
- - 'upgrade_guide/**'
- - 'changelog/**'
-jobs:
- scan-repo:
- runs-on: ubuntu-latest
- steps:
- - name: Check out code
- uses: actions/checkout@v2
- - name: Install Fossa CLI
- run: |
- curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash -s -- -b .
- - name: Scan for dependencies and licenses
- run: |
- FOSSA_API_KEY=${{ secrets.FOSSA_PUSH_ONLY_API_KEY }} ./fossa analyze
diff --git a/.snyk b/.snyk
new file mode 100644
index 00000000000..a081b17225c
--- /dev/null
+++ b/.snyk
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
+version: v1.22.2
+# ignores vulnerabilities until expiry date; change duration by modifying expiry date
+ignore:
+ SNYK-JAVA-ORGGRAALVMSDK-2767964:
+ - '*':
+ reason: cannot upgrade to graal-sdk 22.1.0+ until we move off Java8, which is slated for later this year
+ expires: 2024-01-10T00:00:00.000Z
+ created: 2023-06-21T00:00:00.000Z
+ SNYK-JAVA-ORGGRAALVMSDK-2769618:
+ - '*':
+ reason: cannot upgrade to graal-sdk 22.1.0+ until we move off Java8, which is slated for later this year
+ expires: 2024-01-10T00:00:00.000Z
+ created: 2023-06-21T00:00:00.000Z
+ SNYK-JAVA-ORGGRAALVMSDK-5457933:
+ - '*':
+ reason: cannot upgrade to graal-sdk 22.1.0+ until we move off Java8, which is slated for later this year
+ expires: 2024-01-10T00:00:00.000Z
+ created: 2023-06-21T00:00:00.000Z
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 7b868941bc3..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-language: java
-dist: trusty
-sudo: false
-# see https://sormuras.github.io/blog/2018-03-20-jdk-matrix.html
-matrix:
- include:
- # 8
- - env: JDK='OpenJDK 8'
- jdk: openjdk8
- # 11
- - env: JDK='OpenJDK 11'
- # switch to JDK 11 before running tests
- before_script: . $TRAVIS_BUILD_DIR/ci/install-jdk.sh -F 11 -L GPL
-before_install:
- # Require JDK8 for compiling
- - jdk_switcher use openjdk8
- - ./install-snapshots.sh
-install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
-script: mvn test -Djacoco.skip=true -Dmaven.test.failure.ignore=true -Dmaven.javadoc.skip=true -B -V
-cache:
- directories:
- - $HOME/.m2
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 927c7a7aa8c..53857383cf2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,3 +1,22 @@
+
+
# Contributing guidelines
## Code formatting
diff --git a/Jenkinsfile-asf b/Jenkinsfile-asf
new file mode 100644
index 00000000000..4b5041903c1
--- /dev/null
+++ b/Jenkinsfile-asf
@@ -0,0 +1,81 @@
+#!groovy
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+pipeline {
+ agent {
+ label 'cassandra-small'
+ }
+
+ triggers {
+ // schedules only run against release branches (i.e. 3.x, 4.x, 4.5.x, etc.)
+ cron(branchPatternCron().matcher(env.BRANCH_NAME).matches() ? '@weekly' : '')
+ }
+
+ stages {
+ stage('Matrix') {
+ matrix {
+ axes {
+ axis {
+ name 'TEST_JAVA_VERSION'
+ values 'openjdk@1.8.0-292', 'openjdk@1.11.0-9', 'openjdk@1.17.0', 'openjdk@1.21.0'
+ }
+ axis {
+ name 'SERVER_VERSION'
+ values '3.11',
+ '4.0',
+ '4.1',
+ '5.0'
+ }
+ }
+ stages {
+ stage('Tests') {
+ agent {
+ label 'cassandra-medium'
+ }
+ steps {
+ script {
+ executeTests()
+ junit testResults: '**/target/surefire-reports/TEST-*.xml', allowEmptyResults: true
+ junit testResults: '**/target/failsafe-reports/TEST-*.xml', allowEmptyResults: true
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+def executeTests() {
+ def testJavaMajorVersion = (TEST_JAVA_VERSION =~ /@(?:1\.)?(\d+)/)[0][1]
+ sh """
+ container_id=\$(docker run -td -e TEST_JAVA_VERSION=${TEST_JAVA_VERSION} -e SERVER_VERSION=${SERVER_VERSION} -e TEST_JAVA_MAJOR_VERSION=${testJavaMajorVersion} -v \$(pwd):/home/docker/cassandra-java-driver apache.jfrog.io/cassan-docker/apache/cassandra-java-driver-testing-ubuntu2204 'sleep 2h')
+ docker exec --user root \$container_id bash -c \"sudo bash /home/docker/cassandra-java-driver/ci/create-user.sh docker \$(id -u) \$(id -g) /home/docker/cassandra-java-driver\"
+ docker exec --user docker \$container_id './cassandra-java-driver/ci/run-tests.sh'
+ ( nohup docker stop \$container_id >/dev/null 2>/dev/null & )
+ """
+}
+
+// branch pattern for cron
+// should match 3.x, 4.x, 4.5.x, etc
+def branchPatternCron() {
+ ~'((\\d+(\\.[\\dx]+)+))'
+}
diff --git a/Jenkinsfile b/Jenkinsfile-datastax
similarity index 66%
rename from Jenkinsfile
rename to Jenkinsfile-datastax
index 0f9a28265d3..602f33101ca 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile-datastax
@@ -1,23 +1,52 @@
#!groovy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
def initializeEnvironment() {
- env.DRIVER_DISPLAY_NAME = 'CassandraⓇ Java Driver'
+ env.DRIVER_DISPLAY_NAME = 'Java Driver for Apache CassandraⓇ'
env.DRIVER_METRIC_TYPE = 'oss'
- if (env.GIT_URL.contains('riptano/java-driver')) {
- env.DRIVER_DISPLAY_NAME = 'private ' + env.DRIVER_DISPLAY_NAME
- env.DRIVER_METRIC_TYPE = 'oss-private'
- } else if (env.GIT_URL.contains('java-dse-driver')) {
- env.DRIVER_DISPLAY_NAME = 'DSE Java Driver'
- env.DRIVER_METRIC_TYPE = 'dse'
- }
env.GIT_SHA = "${env.GIT_COMMIT.take(7)}"
env.GITHUB_PROJECT_URL = "https://${GIT_URL.replaceFirst(/(git@|http:\/\/|https:\/\/)/, '').replace(':', '/').replace('.git', '')}"
env.GITHUB_BRANCH_URL = "${GITHUB_PROJECT_URL}/tree/${env.BRANCH_NAME}"
env.GITHUB_COMMIT_URL = "${GITHUB_PROJECT_URL}/commit/${env.GIT_COMMIT}"
- env.MAVEN_HOME = "${env.HOME}/.mvn/apache-maven-3.3.9"
+ env.MAVEN_HOME = "${env.HOME}/.mvn/apache-maven-3.8.8"
env.PATH = "${env.MAVEN_HOME}/bin:${env.PATH}"
+
+ /*
+ * As of JAVA-3042 JAVA_HOME is always set to JDK8 and this is currently necessary for mvn compile and DSE Search/Graph.
+ * To facilitate testing with JDK11/17 we feed the appropriate JAVA_HOME into the maven build via commandline.
+ *
+ * Maven command-line flags:
+ * - -DtestJavaHome=/path/to/java/home: overrides JAVA_HOME for surefire/failsafe tests, defaults to environment JAVA_HOME.
+ * - -Ptest-jdk-N: enables profile for running tests with a specific JDK version (substitute N for 8/11/17).
+ *
+ * Note test-jdk-N is also automatically loaded based off JAVA_HOME SDK version so testing with an older SDK is not supported.
+ *
+ * Environment variables:
+ * - JAVA_HOME: Path to JDK used for mvn (all steps except surefire/failsafe), Cassandra, DSE.
+ * - JAVA8_HOME: Path to JDK8 used for Cassandra/DSE if ccm determines JAVA_HOME is not compatible with the chosen backend.
+ * - TEST_JAVA_HOME: PATH to JDK used for surefire/failsafe testing.
+ * - TEST_JAVA_VERSION: TEST_JAVA_HOME SDK version number [8/11/17], used to configure test-jdk-N profile in maven (see above)
+ */
+
env.JAVA_HOME = sh(label: 'Get JAVA_HOME',script: '''#!/bin/bash -le
. ${JABBA_SHELL}
jabba which ${JABBA_VERSION}''', returnStdout: true).trim()
@@ -25,12 +54,40 @@ def initializeEnvironment() {
. ${JABBA_SHELL}
jabba which 1.8''', returnStdout: true).trim()
- sh label: 'Download Apache CassandraⓇ or DataStax Enterprise',script: '''#!/bin/bash -le
+ sh label: 'Download Apache CassandraⓇ, DataStax Enterprise or DataStax HCD ',script: '''#!/bin/bash -le
. ${JABBA_SHELL}
- jabba use ${JABBA_VERSION}
+ jabba use 1.8
. ${CCM_ENVIRONMENT_SHELL} ${SERVER_VERSION}
'''
+ if (env.SERVER_VERSION.split('-')[0] == 'dse') {
+ env.DSE_FIXED_VERSION = env.SERVER_VERSION.split('-')[1]
+ sh label: 'Update environment for DataStax Enterprise', script: '''#!/bin/bash -le
+ cat >> ${HOME}/environment.txt << ENVIRONMENT_EOF
+CCM_CASSANDRA_VERSION=${DSE_FIXED_VERSION} # maintain for backwards compatibility
+CCM_VERSION=${DSE_FIXED_VERSION}
+CCM_SERVER_TYPE=dse
+DSE_VERSION=${DSE_FIXED_VERSION}
+CCM_BRANCH=${DSE_FIXED_VERSION}
+DSE_BRANCH=${DSE_FIXED_VERSION}
+ENVIRONMENT_EOF
+ '''
+ }
+
+ if (env.SERVER_VERSION.split('-')[0] == 'hcd') {
+ env.HCD_FIXED_VERSION = env.SERVER_VERSION.split('-')[1]
+ sh label: 'Update environment for DataStax HCD', script: '''#!/bin/bash -le
+ cat >> ${HOME}/environment.txt << ENVIRONMENT_EOF
+CCM_CASSANDRA_VERSION=${HCD_FIXED_VERSION} # maintain for backwards compatibility
+CCM_VERSION=${HCD_FIXED_VERSION}
+CCM_SERVER_TYPE=hcd
+HCD_VERSION=${HCD_FIXED_VERSION}
+CCM_BRANCH=${HCD_FIXED_VERSION}
+HCD_BRANCH=${HCD_FIXED_VERSION}
+ENVIRONMENT_EOF
+ '''
+ }
+
sh label: 'Display Java and environment information',script: '''#!/bin/bash -le
# Load CCM environment variables
set -o allexport
@@ -38,7 +95,7 @@ def initializeEnvironment() {
set +o allexport
. ${JABBA_SHELL}
- jabba use ${JABBA_VERSION}
+ jabba use 1.8
java -version
mvn -v
@@ -47,25 +104,32 @@ def initializeEnvironment() {
}
def buildDriver(jabbaVersion) {
- withEnv(["BUILD_JABBA_VERSION=${jabbaVersion}"]) {
- sh label: 'Build driver', script: '''#!/bin/bash -le
- . ${JABBA_SHELL}
- jabba use ${BUILD_JABBA_VERSION}
+ def buildDriverScript = '''#!/bin/bash -le
- mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
- '''
- }
+ . ${JABBA_SHELL}
+ jabba use '''+jabbaVersion+'''
+
+ echo "Building with Java version '''+jabbaVersion+'''"
+
+ mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
+ '''
+ sh label: 'Build driver', script: buildDriverScript
}
def executeTests() {
- sh label: 'Execute tests', script: '''#!/bin/bash -le
+ def testJavaHome = sh(label: 'Get TEST_JAVA_HOME',script: '''#!/bin/bash -le
+ . ${JABBA_SHELL}
+ jabba which ${JABBA_VERSION}''', returnStdout: true).trim()
+ def testJavaVersion = (JABBA_VERSION =~ /.*\.(\d+)/)[0][1]
+
+ def executeTestScript = '''#!/bin/bash -le
# Load CCM environment variables
set -o allexport
. ${HOME}/environment.txt
set +o allexport
. ${JABBA_SHELL}
- jabba use ${JABBA_VERSION}
+ jabba use 1.8
if [ "${JABBA_VERSION}" != "1.8" ]; then
SKIP_JAVADOCS=true
@@ -79,17 +143,21 @@ def executeTests() {
fi
printenv | sort
- mvn -B -V ${INTEGRATION_TESTS_FILTER_ARGUMENT} verify \
+ mvn -B -V ${INTEGRATION_TESTS_FILTER_ARGUMENT} -T 1 verify \
+ -Ptest-jdk-'''+testJavaVersion+''' \
+ -DtestJavaHome='''+testJavaHome+''' \
-DfailIfNoTests=false \
-Dmaven.test.failure.ignore=true \
-Dmaven.javadoc.skip=${SKIP_JAVADOCS} \
-Dccm.version=${CCM_CASSANDRA_VERSION} \
- -Dccm.dse=${CCM_IS_DSE} \
+ -Dccm.distribution=${CCM_SERVER_TYPE:cassandra} \
-Dproxy.path=${HOME}/proxy \
${SERIAL_ITS_ARGUMENT} \
${ISOLATED_ITS_ARGUMENT} \
${PARALLELIZABLE_ITS_ARGUMENT}
'''
+ echo "Invoking Maven with parameters test-jdk-${testJavaVersion} and testJavaHome = ${testJavaHome}"
+ sh label: 'Execute tests', script: executeTestScript
}
def executeCodeCoverage() {
@@ -133,25 +201,6 @@ ${status} after ${currentBuild.durationString - ' and counting'}"""
}
}
-def submitCIMetrics(buildType) {
- long durationMs = currentBuild.duration
- long durationSec = durationMs / 1000
- long nowSec = (currentBuild.startTimeInMillis + durationMs) / 1000
- def branchNameNoPeriods = env.BRANCH_NAME.replaceAll('\\.', '_')
- def durationMetric = "okr.ci.java.${env.DRIVER_METRIC_TYPE}.${buildType}.${branchNameNoPeriods} ${durationSec} ${nowSec}"
-
- timeout(time: 1, unit: 'MINUTES') {
- withCredentials([string(credentialsId: 'lab-grafana-address', variable: 'LAB_GRAFANA_ADDRESS'),
- string(credentialsId: 'lab-grafana-port', variable: 'LAB_GRAFANA_PORT')]) {
- withEnv(["DURATION_METRIC=${durationMetric}"]) {
- sh label: 'Send runtime metrics to labgrafana', script: '''#!/bin/bash -le
- echo "${DURATION_METRIC}" | nc -q 5 ${LAB_GRAFANA_ADDRESS} ${LAB_GRAFANA_PORT}
- '''
- }
- }
- }
-}
-
def describePerCommitStage() {
script {
currentBuild.displayName = "Per-Commit build"
@@ -175,7 +224,9 @@ def describeAdhocAndScheduledTestingStage() {
// branch pattern for cron
// should match 3.x, 4.x, 4.5.x, etc
-def branchPatternCron = ~"((\\d+(\\.[\\dx]+)+))"
+def branchPatternCron() {
+ ~"((\\d+(\\.[\\dx]+)+))"
+}
pipeline {
agent none
@@ -210,17 +261,17 @@ pipeline {
''')
choice(
name: 'ADHOC_BUILD_AND_EXECUTE_TESTS_SERVER_VERSION',
- choices: ['2.1', // Legacy Apache CassandraⓇ
- '2.2', // Legacy Apache CassandraⓇ
- '3.0', // Previous Apache CassandraⓇ
- '3.11', // Current Apache CassandraⓇ
- '4.0', // Development Apache CassandraⓇ
- 'dse-4.8', // Previous EOSL DataStax Enterprise
- 'dse-5.0', // Long Term Support DataStax Enterprise
- 'dse-5.1', // Legacy DataStax Enterprise
- 'dse-6.0', // Previous DataStax Enterprise
- 'dse-6.7', // Previous DataStax Enterprise
- 'dse-6.8', // Current DataStax Enterprise
+ choices: ['4.0', // Previous Apache CassandraⓇ
+ '4.1', // Previous Apache CassandraⓇ
+ '5.0', // Current Apache CassandraⓇ
+ 'dse-4.8.16', // Previous EOSL DataStax Enterprise
+ 'dse-5.0.15', // Long Term Support DataStax Enterprise
+ 'dse-5.1.35', // Legacy DataStax Enterprise
+ 'dse-6.0.18', // Previous DataStax Enterprise
+ 'dse-6.7.17', // Previous DataStax Enterprise
+ 'dse-6.8.30', // Current DataStax Enterprise
+ 'dse-6.9.0', // Current DataStax Enterprise
+ 'hcd-1.0.0', // Current DataStax HCD
'ALL'],
description: '''Apache Cassandra® and DataStax Enterprise server version to use for adhoc BUILD-AND-EXECUTE-TESTS builds
@@ -231,59 +282,58 @@ pipeline {
Description
- 2.1
- Apache Cassandra® v2.1.x
-
-
- 2.2
- Apache Cassandra® v2.2.x
-
-
- 3.0
- Apache Cassandra® v3.0.x
+ 4.0
+ Apache Cassandra® v4.0.x
- 3.11
- Apache Cassandra® v3.11.x
+ 4.1
+ Apache Cassandra® v4.1.x
- 4.0
- Apache Cassandra® v4.x (CURRENTLY UNDER DEVELOPMENT )
+ 5.0
+ Apache Cassandra® v5.0.x
- dse-4.8
+ dse-4.8.16
DataStax Enterprise v4.8.x (END OF SERVICE LIFE )
- dse-5.0
+ dse-5.0.15
DataStax Enterprise v5.0.x (Long Term Support )
- dse-5.1
+ dse-5.1.35
DataStax Enterprise v5.1.x
- dse-6.0
+ dse-6.0.18
DataStax Enterprise v6.0.x
- dse-6.7
+ dse-6.7.17
DataStax Enterprise v6.7.x
- dse-6.8
+ dse-6.8.30
DataStax Enterprise v6.8.x
+
+ dse-6.9.0
+ DataStax Enterprise v6.9.x
+
+
+ hcd-1.0.0
+ DataStax HCD v1.0.x
+
''')
choice(
name: 'ADHOC_BUILD_AND_EXECUTE_TESTS_JABBA_VERSION',
- choices: ['1.8', // Oracle JDK version 1.8 (current default)
- 'openjdk@1.9', // OpenJDK version 9
- 'openjdk@1.10', // OpenJDK version 10
+ choices: [
+ '1.8', // Oracle JDK version 1.8 (current default)
'openjdk@1.11', // OpenJDK version 11
- 'openjdk@1.12', // OpenJDK version 12
- 'openjdk@1.13', // OpenJDK version 13
- 'openjdk@1.14'], // OpenJDK version 14
+ 'openjdk@1.17', // OpenJDK version 17
+ 'openjdk@1.21' // OpenJDK version 21
+ ],
description: '''JDK version to use for TESTING when running adhoc BUILD-AND-EXECUTE-TESTS builds. All builds will use JDK8 for building the driver
@@ -296,29 +346,17 @@ pipeline {
1.8
Oracle JDK version 1.8 (Used for compiling regardless of choice )
-
- openjdk@1.9
- OpenJDK version 9
-
-
- openjdk@1.10
- OpenJDK version 10
-
openjdk@1.11
OpenJDK version 11
- openjdk@1.12
- OpenJDK version 12
-
-
- openjdk@1.13
- OpenJDK version 13
+ openjdk@1.17
+ OpenJDK version 17
- openjdk@1.14
- OpenJDK version 14
+ openjdk@1.21
+ OpenJDK version 21
''')
booleanParam(
@@ -354,20 +392,17 @@ pipeline {
triggers {
// schedules only run against release branches (i.e. 3.x, 4.x, 4.5.x, etc.)
- parameterizedCron(branchPatternCron.matcher(env.BRANCH_NAME).matches() ? """
- # Every weeknight (Monday - Friday) around 2:00 AM
- ### JDK8 tests against 2.1, 3.0, DSE 4.8, DSE 5.0, DSE 5.1, DSE-6.0 and DSE 6.7
- H 2 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=2.1 3.0 dse-4.8 dse-5.0 dse-5.1 dse-6.0 dse-6.7;CI_SCHEDULE_JABBA_VERSION=1.8
- ### JDK11 tests against 3.11, 4.0 and DSE 6.8
- H 2 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=3.11 4.0 dse-6.8;CI_SCHEDULE_JABBA_VERSION=openjdk@1.11
- # Every weekend (Sunday) around 12:00 PM noon
- ### JDK14 tests against 3.11, 4.0 and DSE 6.8
- H 12 * * 0 %CI_SCHEDULE=WEEKENDS;CI_SCHEDULE_SERVER_VERSIONS=3.11 4.0 dse-6.8;CI_SCHEDULE_JABBA_VERSION=openjdk@1.14
+ parameterizedCron(branchPatternCron().matcher(env.BRANCH_NAME).matches() ? """
+ # Every weekend (Saturday, Sunday) around 2:00 AM
+ H 2 * * 0 %CI_SCHEDULE=WEEKENDS;CI_SCHEDULE_SERVER_VERSIONS=4.0 4.1 5.0 dse-4.8.16 dse-5.0.15 dse-5.1.35 dse-6.0.18 dse-6.7.17;CI_SCHEDULE_JABBA_VERSION=1.8
+ # Every weeknight (Monday - Friday) around 12:00 PM noon
+ H 12 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=4.1 5.0 dse-6.8.30 dse-6.9.0 hcd-1.0.0;CI_SCHEDULE_JABBA_VERSION=openjdk@1.11
+ H 12 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=4.1 5.0 dse-6.8.30 dse-6.9.0 hcd-1.0.0;CI_SCHEDULE_JABBA_VERSION=openjdk@1.17
""" : "")
}
environment {
- OS_VERSION = 'ubuntu/bionic64/java-driver'
+ OS_VERSION = 'ubuntu/focal64/java-driver'
JABBA_SHELL = '/usr/lib/jabba/jabba.sh'
CCM_ENVIRONMENT_SHELL = '/usr/local/bin/ccm_environment.sh'
SERIAL_ITS_ARGUMENT = "-DskipSerialITs=${params.SKIP_SERIAL_ITS}"
@@ -396,19 +431,24 @@ pipeline {
axes {
axis {
name 'SERVER_VERSION'
- values '3.11', // Latest stable Apache CassandraⓇ
- '4.0', // Development Apache CassandraⓇ
- 'dse-6.8' // Current DataStax Enterprise
+ values '4.0', // Previous Apache CassandraⓇ
+ '5.0', // Current Apache CassandraⓇ
+ 'dse-6.8.30', // Current DataStax Enterprise
+ 'dse-6.9.0', // Current DataStax Enterprise
+ 'hcd-1.0.0' // Current DataStax HCD
+ }
+ axis {
+ name 'JABBA_VERSION'
+ values '1.8', // jdk8
+ 'openjdk@1.11', // jdk11
+ 'openjdk@1.17', // jdk17
+ 'openjdk@1.21' // jdk21
}
}
agent {
label "${OS_VERSION}"
}
- environment {
- // Per-commit builds are only going to run against JDK8
- JABBA_VERSION = '1.8'
- }
stages {
stage('Initialize-Environment') {
@@ -428,7 +468,7 @@ pipeline {
}
stage('Build-Driver') {
steps {
- buildDriver(env.JABBA_VERSION)
+ buildDriver('1.8')
}
}
stage('Execute-Tests') {
@@ -460,11 +500,6 @@ pipeline {
}
}
post {
- always {
- node('master') {
- submitCIMetrics('commit')
- }
- }
aborted {
notifySlack('aborted')
}
@@ -507,16 +542,17 @@ pipeline {
axes {
axis {
name 'SERVER_VERSION'
- values '2.1', // Legacy Apache CassandraⓇ
- '3.0', // Previous Apache CassandraⓇ
- '3.11', // Current Apache CassandraⓇ
- '4.0', // Development Apache CassandraⓇ
- 'dse-4.8', // Previous EOSL DataStax Enterprise
- 'dse-5.0', // Last EOSL DataStax Enterprise
- 'dse-5.1', // Legacy DataStax Enterprise
- 'dse-6.0', // Previous DataStax Enterprise
- 'dse-6.7', // Previous DataStax Enterprise
- 'dse-6.8' // Current DataStax Enterprise
+ values '4.0', // Previous Apache CassandraⓇ
+ '4.1', // Previous Apache CassandraⓇ
+ '5.0', // Current Apache CassandraⓇ
+ 'dse-4.8.16', // Previous EOSL DataStax Enterprise
+ 'dse-5.0.15', // Last EOSL DataStax Enterprise
+ 'dse-5.1.35', // Legacy DataStax Enterprise
+ 'dse-6.0.18', // Previous DataStax Enterprise
+ 'dse-6.7.17', // Previous DataStax Enterprise
+ 'dse-6.8.30', // Current DataStax Enterprise
+ 'dse-6.9.0', // Current DataStax Enterprise
+ 'hcd-1.0.0' // Current DataStax HCD
}
}
when {
@@ -547,8 +583,7 @@ pipeline {
}
stage('Build-Driver') {
steps {
- // Jabba default should be a JDK8 for now
- buildDriver('default')
+ buildDriver('1.8')
}
}
stage('Execute-Tests') {
diff --git a/LICENSE b/LICENSE
index d6456956733..a157e31d058 100644
--- a/LICENSE
+++ b/LICENSE
@@ -200,3 +200,24 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+
+Apache Cassandra Java Driver bundles code and files from the following projects:
+
+JNR project
+Copyright (C) 2008-2010 Wayne Meissner
+This product includes software developed as part of the JNR project ( https://github.com/jnr/jnr-ffi )s.
+see core/src/main/java/com/datastax/oss/driver/internal/core/os/CpuInfo.java
+
+Protocol Buffers
+Copyright 2008 Google Inc.
+This product includes software developed as part of the Protocol Buffers project ( https://developers.google.com/protocol-buffers/ ).
+see core/src/main/java/com/datastax/oss/driver/internal/core/type/util/VIntCoding.java
+
+Guava
+Copyright (C) 2007 The Guava Authors
+This product includes software developed as part of the Guava project ( https://guava.dev ).
+see core/src/main/java/com/datastax/oss/driver/internal/core/util/CountingIterator.java
+
+Copyright (C) 2018 Christian Stein
+This product includes software developed by Christian Stein
+see ci/install-jdk.sh
diff --git a/LICENSE_binary b/LICENSE_binary
new file mode 100644
index 00000000000..b59c6ec22bb
--- /dev/null
+++ b/LICENSE_binary
@@ -0,0 +1,247 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+Apache Cassandra Java Driver bundles code and files from the following projects:
+
+JNR project
+Copyright (C) 2008-2010 Wayne Meissner
+This product includes software developed as part of the JNR project ( https://github.com/jnr/jnr-ffi )s.
+see core/src/main/java/com/datastax/oss/driver/internal/core/os/CpuInfo.java
+
+Protocol Buffers
+Copyright 2008 Google Inc.
+This product includes software developed as part of the Protocol Buffers project ( https://developers.google.com/protocol-buffers/ ).
+see core/src/main/java/com/datastax/oss/driver/internal/core/type/util/VIntCoding.java
+
+Guava
+Copyright (C) 2007 The Guava Authors
+This product includes software developed as part of the Guava project ( https://guava.dev ).
+see core/src/main/java/com/datastax/oss/driver/internal/core/util/CountingIterator.java
+
+Copyright (C) 2018 Christian Stein
+This product includes software developed by Christian Stein
+see ci/install-jdk.sh
+
+This product bundles Java Native Runtime - POSIX 3.1.15,
+which is available under the Eclipse Public License version 2.0.
+see licenses/jnr-posix.txt
+
+This product bundles jnr-x86asm 1.0.2,
+which is available under the MIT License.
+see licenses/jnr-x86asm.txt
+
+This product bundles ASM 9.2: a very small and fast Java bytecode manipulation framework,
+which is available under the 3-Clause BSD License.
+see licenses/asm.txt
+
+This product bundles HdrHistogram 2.1.12: A High Dynamic Range (HDR) Histogram,
+which is available under the 2-Clause BSD License.
+see licenses/HdrHistogram.txt
+
+This product bundles The Simple Logging Facade for Java (SLF4J) API 1.7.26,
+which is available under the MIT License.
+see licenses/slf4j-api.txt
+
+This product bundles Reactive Streams 1.0.3,
+which is available under the MIT License.
+see licenses/reactive-streams.txt
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 00000000000..8e27ae3e52f
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Cassandra Java Driver
+Copyright 2012- The Apache Software Foundation
+
+This product includes software developed at The Apache Software
+Foundation (http://www.apache.org/).
diff --git a/NOTICE_binary.txt b/NOTICE_binary.txt
new file mode 100644
index 00000000000..f6f11c298f6
--- /dev/null
+++ b/NOTICE_binary.txt
@@ -0,0 +1,249 @@
+Apache Cassandra Java Driver
+Copyright 2012- The Apache Software Foundation
+
+This product includes software developed at The Apache Software
+Foundation (http://www.apache.org/).
+
+This compiled product also includes Apache-licensed dependencies
+that contain the following NOTICE information:
+
+==================================================================
+io.netty:netty-handler NOTICE.txt
+==================================================================
+This product contains the extensions to Java Collections Framework which has
+been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene:
+
+ * LICENSE:
+ * license/LICENSE.jsr166y.txt (Public Domain)
+ * HOMEPAGE:
+ * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/
+ * http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/
+
+This product contains a modified version of Robert Harder's Public Domain
+Base64 Encoder and Decoder, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.base64.txt (Public Domain)
+ * HOMEPAGE:
+ * http://iharder.sourceforge.net/current/java/base64/
+
+This product contains a modified portion of 'Webbit', an event based
+WebSocket and HTTP server, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.webbit.txt (BSD License)
+ * HOMEPAGE:
+ * https://github.com/joewalnes/webbit
+
+This product contains a modified portion of 'SLF4J', a simple logging
+facade for Java, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.slf4j.txt (MIT License)
+ * HOMEPAGE:
+ * https://www.slf4j.org/
+
+This product contains a modified portion of 'Apache Harmony', an open source
+Java SE, which can be obtained at:
+
+ * NOTICE:
+ * license/NOTICE.harmony.txt
+ * LICENSE:
+ * license/LICENSE.harmony.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://archive.apache.org/dist/harmony/
+
+This product contains a modified portion of 'jbzip2', a Java bzip2 compression
+and decompression library written by Matthew J. Francis. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.jbzip2.txt (MIT License)
+ * HOMEPAGE:
+ * https://code.google.com/p/jbzip2/
+
+This product contains a modified portion of 'libdivsufsort', a C API library to construct
+the suffix array and the Burrows-Wheeler transformed string for any input string of
+a constant-size alphabet written by Yuta Mori. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.libdivsufsort.txt (MIT License)
+ * HOMEPAGE:
+ * https://github.com/y-256/libdivsufsort
+
+This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM,
+ which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.jctools.txt (ASL2 License)
+ * HOMEPAGE:
+ * https://github.com/JCTools/JCTools
+
+This product optionally depends on 'JZlib', a re-implementation of zlib in
+pure Java, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.jzlib.txt (BSD style License)
+ * HOMEPAGE:
+ * http://www.jcraft.com/jzlib/
+
+This product optionally depends on 'Compress-LZF', a Java library for encoding and
+decoding data in LZF format, written by Tatu Saloranta. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.compress-lzf.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/ning/compress
+
+This product optionally depends on 'lz4', a LZ4 Java compression
+and decompression library written by Adrien Grand. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.lz4.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/yawkat/lz4-java
+
+This product optionally depends on 'lzma-java', a LZMA Java compression
+and decompression library, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.lzma-java.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/jponge/lzma-java
+
+This product optionally depends on 'zstd-jni', a zstd-jni Java compression
+and decompression library, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.zstd-jni.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/luben/zstd-jni
+
+This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression
+and decompression library written by William Kinney. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.jfastlz.txt (MIT License)
+ * HOMEPAGE:
+ * https://code.google.com/p/jfastlz/
+
+This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data
+interchange format, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.protobuf.txt (New BSD License)
+ * HOMEPAGE:
+ * https://github.com/google/protobuf
+
+This product optionally depends on 'Bouncy Castle Crypto APIs' to generate
+a temporary self-signed X.509 certificate when the JVM does not provide the
+equivalent functionality. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.bouncycastle.txt (MIT License)
+ * HOMEPAGE:
+ * https://www.bouncycastle.org/
+
+This product optionally depends on 'Snappy', a compression library produced
+by Google Inc, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.snappy.txt (New BSD License)
+ * HOMEPAGE:
+ * https://github.com/google/snappy
+
+This product optionally depends on 'JBoss Marshalling', an alternative Java
+serialization API, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.jboss-marshalling.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/jboss-remoting/jboss-marshalling
+
+This product optionally depends on 'Caliper', Google's micro-
+benchmarking framework, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.caliper.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/google/caliper
+
+This product optionally depends on 'Apache Commons Logging', a logging
+framework, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.commons-logging.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://commons.apache.org/logging/
+
+This product optionally depends on 'Apache Log4J', a logging framework, which
+can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.log4j.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://logging.apache.org/log4j/
+
+This product optionally depends on 'Aalto XML', an ultra-high performance
+non-blocking XML processor, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.aalto-xml.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://wiki.fasterxml.com/AaltoHome
+
+This product contains a modified version of 'HPACK', a Java implementation of
+the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.hpack.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/twitter/hpack
+
+This product contains a modified version of 'HPACK', a Java implementation of
+the HTTP/2 HPACK algorithm written by Cory Benfield. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.hyper-hpack.txt (MIT License)
+ * HOMEPAGE:
+ * https://github.com/python-hyper/hpack/
+
+This product contains a modified version of 'HPACK', a Java implementation of
+the HTTP/2 HPACK algorithm written by Tatsuhiro Tsujikawa. It can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.nghttp2-hpack.txt (MIT License)
+ * HOMEPAGE:
+ * https://github.com/nghttp2/nghttp2/
+
+This product contains a modified portion of 'Apache Commons Lang', a Java library
+provides utilities for the java.lang API, which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.commons-lang.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://commons.apache.org/proper/commons-lang/
+
+
+This product contains the Maven wrapper scripts from 'Maven Wrapper', that provides an easy way to ensure a user has everything necessary to run the Maven build.
+
+ * LICENSE:
+ * license/LICENSE.mvn-wrapper.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/takari/maven-wrapper
+
+This product contains the dnsinfo.h header file, that provides a way to retrieve the system DNS configuration on MacOS.
+This private header is also used by Apple's open source
+ mDNSResponder (https://opensource.apple.com/tarballs/mDNSResponder/).
+
+ * LICENSE:
+ * license/LICENSE.dnsinfo.txt (Apple Public Source License 2.0)
+ * HOMEPAGE:
+ * https://www.opensource.apple.com/source/configd/configd-453.19/dnsinfo/dnsinfo.h
+
+This product optionally depends on 'Brotli4j', Brotli compression and
+decompression for Java., which can be obtained at:
+
+ * LICENSE:
+ * license/LICENSE.brotli4j.txt (Apache License 2.0)
+ * HOMEPAGE:
+ * https://github.com/hyperxpro/Brotli4j
diff --git a/README.md b/README.md
index 0b5a61520f5..d8ef01d0964 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,12 @@
-# DataStax Java Driver for Apache Cassandra®
+# Java Driver for Apache Cassandra®
-[](https://maven-badges.herokuapp.com/maven-central/com.datastax.oss/java-driver-core)
+[](https://opensource.org/licenses/Apache-2.0)
+[](https://maven-badges.herokuapp.com/maven-central/org.apache.cassandra/java-driver-core)
*If you're reading this on github.com, please note that this is the readme for the development
version and that some features described here might not yet have been released. You can find the
documentation for latest version through [DataStax Docs] or via the release tags, e.g.
-[4.15.0](https://github.com/datastax/java-driver/tree/4.15.0).*
+[4.17.0](https://github.com/datastax/java-driver/tree/4.17.0).*
A modern, feature-rich and highly tunable Java client library for [Apache Cassandra®] \(2.1+) and
[DataStax Enterprise] \(4.7+), and [DataStax Astra], using exclusively Cassandra's binary protocol
@@ -13,29 +14,27 @@ and Cassandra Query Language (CQL) v3.
[DataStax Docs]: http://docs.datastax.com/en/developer/java-driver/
[Apache Cassandra®]: http://cassandra.apache.org/
-[DataStax Enterprise]: https://www.datastax.com/products/datastax-enterprise
-[DataStax Astra]: https://www.datastax.com/products/datastax-astra
## Getting the driver
-The driver artifacts are published in Maven central, under the group id [com.datastax.oss]; there
+The driver artifacts are published in Maven central, under the group id [org.apache.cassandra]; there
are multiple modules, all prefixed with `java-driver-`.
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
- com.datastax.oss
+ org.apache.cassandra
java-driver-query-builder
${driver.version}
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-runtime
${driver.version}
@@ -47,7 +46,7 @@ dependency if you plan to use it.
Refer to each module's manual for more details ([core](manual/core/), [query
builder](manual/query_builder/), [mapper](manual/mapper)).
-[com.datastax.oss]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.datastax.oss%22
+[org.apache.cassandra]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.cassandra%22
## Compatibility
@@ -59,14 +58,9 @@ It requires Java 8 or higher.
Disclaimer: Some DataStax/DataStax Enterprise products might partially work on big-endian systems,
but DataStax does not officially support these systems.
-## Connecting to DataStax Astra
-
-The driver comes with built-in support for Astra, DataStax's cloud-native Cassandra-as-a-service
-offering. See the dedicated [manual page](manual/cloud/) for more details.
-
## Migrating from previous versions
-Java driver 4 is **not binary compatible** with previous versions. However, most of the concepts
+Java Driver 4 is **not binary compatible** with previous versions. However, most of the concepts
remain unchanged, and the new API will look very familiar to 2.x and 3.x users.
See the [upgrade guide](upgrade_guide/) for details.
@@ -77,22 +71,18 @@ See the [upgrade guide](upgrade_guide/) for details.
* [API docs]
* Bug tracking: [JIRA]
* [Mailing list]
-* Twitter: [@dsJavaDriver] tweets Java driver releases and important announcements (low frequency).
- [@DataStaxEng] has more news, including other drivers, Cassandra, and DSE.
* [Changelog]
* [FAQ]
-[API docs]: https://docs.datastax.com/en/drivers/java/4.14
-[JIRA]: https://datastax-oss.atlassian.net/browse/JAVA
+[API docs]: https://docs.datastax.com/en/drivers/java/4.17
+[JIRA]: https://issues.apache.org/jira/issues/?jql=project%20%3D%20CASSJAVA%20ORDER%20BY%20key%20DESC
[Mailing list]: https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user
-[@dsJavaDriver]: https://twitter.com/dsJavaDriver
-[@DataStaxEng]: https://twitter.com/datastaxeng
[Changelog]: changelog/
[FAQ]: faq/
## License
-© DataStax, Inc.
+© The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -108,9 +98,8 @@ limitations under the License.
----
-DataStax is a registered trademark of DataStax, Inc. and its subsidiaries in the United States
-and/or other countries.
-
Apache Cassandra, Apache, Tomcat, Lucene, Solr, Hadoop, Spark, TinkerPop, and Cassandra are
trademarks of the [Apache Software Foundation](http://www.apache.org/) or its subsidiaries in
Canada, the United States and/or other countries.
+
+Binary artifacts of this product bundle Java Native Runtime libraries, which is available under the Eclipse Public License version 2.0.
diff --git a/bom/pom.xml b/bom/pom.xml
index 837fcde0f89..dd76153a9b1 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -1,13 +1,15 @@
+
## Changelog
+### 4.19.2
+
+- [bug] CASSJAVA-116: Retry or Speculative Execution with RequestIdGenerator throws "Duplicate Key"
+
+### 4.19.1
+
+- [improvement] CASSJAVA-97: Let users inject an ID for each request and write to the custom payload
+- [improvement] CASSJAVA-92: Add Local DC to driver connection info and provide visibility with nodetool clientstats
+- [bug] PR 2025: Eliminate lock in ConcurrencyLimitingRequestThrottler
+- [improvement] CASSJAVA-89: Fix deprecated table configs in Cassandra 5
+- [improvement] PR 2028: Remove unnecessary locking in DefaultNettyOptions
+- [improvement] CASSJAVA-102: Fix revapi spurious complaints about optional dependencies
+- [improvement] PR 2013: Add SubnetAddressTranslator
+- [improvement] CASSJAVA-68: Improve DefaultCodecRegistry.CacheKey#hashCode() to eliminate Object[] allocation
+- [improvement] PR 1989: Bump Jackson version to la(te)st 2.13.x, 2.13.5
+- [improvement] CASSJAVA-76: Make guava an optional dependency of java-driver-guava-shaded
+- [bug] PR 2035: Prevent long overflow in SNI address resolution
+- [improvement] CASSJAVA-77: 4.x: Upgrade Netty to 4.1.119
+- [improvement] CASSJAVA-40: Driver testing against Java 21
+- [improvement] CASSJAVA-90: Update native-protocol
+- [improvement] CASSJAVA-80: Support configuration to disable DNS reverse-lookups for SAN validation
+
+### 4.19.0
+
+- [bug] JAVA-3055: Prevent PreparedStatement cache to be polluted if a request is cancelled.
+- [bug] JAVA-3168: Copy node info for contact points on initial node refresh only from first match by endpoint
+- [improvement] JAVA-3143: Extend driver vector support to arbitrary subtypes and fix handling of variable length types (OSS C* 5.0)
+- [improvement] CASSJAVA-53: Update Guava version used in cassandra-java-driver
+- [improvement] JAVA-3118: Add support for vector data type in Schema Builder, QueryBuilder
+- [bug] CASSJAVA-55: Remove setting "Host" header for metadata requests
+- [bug] JAVA-3057: Allow decoding a UDT that has more fields than expected
+- [improvement] CASSJAVA-52: Bring java-driver-shaded-guava into the repo as a submodule
+- [bug] CASSJAVA-2: TableMetadata#describe produces invalid CQL when a type of a column is a vector
+- [bug] JAVA-3051: Memory leak in DefaultLoadBalancingPolicy measurement of response times
+- [improvement] CASSJAVA-14: Query builder support for NOT CQL syntax
+- [bug] CASSJAVA-12: DefaultSslEngineFactory missing null check on close
+- [improvement] CASSJAVA-46: Expose table extensions via schema builders
+- [bug] PR 1938: Fix uncaught exception during graceful channel shutdown after exceeding max orphan ids
+- [improvement] PR 1607: Annotate BatchStatement, Statement, SimpleStatement methods with CheckReturnValue
+- [improvement] CASSJAVA-41: Reduce lock held duration in ConcurrencyLimitingRequestThrottler
+- [bug] JAVA-3149: Async Query Cancellation Not Propagated To RequestThrottler
+- [bug] JAVA-3167: CompletableFutures.allSuccessful() may return never completed future
+- [bug] PR 1620: Don't return empty routing key when partition key is unbound
+- [improvement] PR 1623: Limit calls to Conversions.resolveExecutionProfile
+- [improvement] CASSJAVA-29: Update target Cassandra versions for integration tests, support new 5.0.x
+
+### 4.18.1
+
+- [improvement] JAVA-3142: Ability to specify ordering of remote local dc's via new configuration for graceful automatic failovers
+- [bug] CASSANDRA-19457: Object reference in Micrometer metrics prevent GC from reclaiming Session instances
+- [improvement] CASSANDRA-19468: Don't swallow exception during metadata refresh
+- [bug] CASSANDRA-19333: Fix data corruption in VectorCodec when using heap buffers
+- [improvement] CASSANDRA-19290: Replace uses of AttributeKey.newInstance
+- [improvement] CASSANDRA-19352: Support native_transport_(address|port) + native_transport_port_ssl for DSE 6.8 (4.x edition)
+- [improvement] CASSANDRA-19180: Support reloading keystore in cassandra-java-driver
+
+### 4.18.0
+
+- [improvement] PR 1689: Add support for publishing percentile time series for the histogram metrics (nparaddi-walmart)
+- [improvement] JAVA-3104: Do not eagerly pre-allocate array when deserializing CqlVector
+- [improvement] JAVA-3111: upgrade jackson-databind to 2.13.4.2 to address gradle dependency issue
+- [improvement] PR 1617: Improve ByteBufPrimitiveCodec readBytes (chibenwa)
+- [improvement] JAVA-3095: Fix CREATE keyword in vector search example in upgrade guide
+- [improvement] JAVA-3100: Update jackson-databind to 2.13.4.1 and jackson-jaxrs-json-provider to 2.13.4 to address recent CVEs
+- [improvement] JAVA-3089: Forbid wildcard imports
+
+### 4.17.0
+
+- [improvement] JAVA-3070: Make CqlVector and CqlDuration serializable
+- [improvement] JAVA-3085: Initialize c.d.o.d.i.core.util.Dependency at Graal native image build-time
+- [improvement] JAVA-3061: CqlVector API improvements, add support for accessing vectors directly as float arrays
+- [improvement] JAVA-3042: Enable automated testing for Java17
+- [improvement] JAVA-3050: Upgrade Netty to 4.1.94
+
+### 4.16.0
+
+- [improvement] JAVA-3058: Clear prepared statement cache on UDT type change event
+- [improvement] JAVA-3060: Add vector type, codec + support for parsing CQL type
+- [improvement] DOC-2813: Add error handling guidance linking to a helpful blog post
+- [improvement] JAVA-3045: Fix GraalVM native image support for GraalVM 22.2
+
### 4.15.0
- [improvement] JAVA-3041: Update Guava session sample code to use ProgrammaticArguments
@@ -617,7 +717,26 @@ changelog](https://docs.datastax.com/en/developer/java-driver-dse/latest/changel
- [bug] JAVA-1499: Wait for load balancing policy at cluster initialization
- [new feature] JAVA-1495: Add prepared statements
+## 3.11.5
+- [improvement] JAVA-3114: Shade io.dropwizard.metrics:metrics-core in shaded driver
+- [improvement] JAVA-3115: SchemaChangeListener#onKeyspaceChanged can fire when keyspace has not changed if using SimpleStrategy replication
+
+## 3.11.4
+- [improvement] JAVA-3079: Upgrade Netty to 4.1.94, 3.x edition
+- [improvement] JAVA-3082: Fix maven build for Apple-silicon
+- [improvement] PR 1671: Fix LatencyAwarePolicy scale docstring
+
+## 3.11.3
+
+- [improvement] JAVA-3023: Upgrade Netty to 4.1.77, 3.x edition
+
+## 3.11.2
+
+- [improvement] JAVA-3008: Upgrade Netty to 4.1.75, 3.x edition
+- [improvement] JAVA-2984: Upgrade Jackson to resolve high-priority CVEs
+
## 3.11.1
+
- [bug] JAVA-2967: Support native transport peer information for DSE 6.8.
- [bug] JAVA-2976: Support missing protocol v5 error codes CAS_WRITE_UNKNOWN, CDC_WRITE_FAILURE.
diff --git a/ci/create-user.sh b/ci/create-user.sh
new file mode 100644
index 00000000000..fb193df9a00
--- /dev/null
+++ b/ci/create-user.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+################################
+#
+# Prep
+#
+################################
+
+if [ "$1" == "-h" ]; then
+ echo "$0 [-h] "
+ echo " this script is used internally by other scripts in the same directory to create a user with the running host user's same uid and gid"
+ exit 1
+fi
+
+# arguments
+username=$1
+uid=$2
+gid=$3
+BUILD_HOME=$4
+
+################################
+#
+# Main
+#
+################################
+
+# disable git directory ownership checks
+su ${username} -c "git config --global safe.directory '*'"
+
+if grep "^ID=" /etc/os-release | grep -q 'debian\|ubuntu' ; then
+ deluser docker
+ adduser --quiet --disabled-login --no-create-home --uid $uid --gecos ${username} ${username}
+ groupmod --non-unique -g $gid $username
+ gpasswd -a ${username} sudo >/dev/null
+else
+ adduser --no-create-home --uid $uid ${username}
+fi
+
+# sudo priviledges
+echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username}
+chmod 0440 /etc/sudoers.d/${username}
+
+# proper permissions
+chown -R ${username}:${username} /home/docker
+chmod og+wx ${BUILD_HOME}
\ No newline at end of file
diff --git a/ci/run-tests.sh b/ci/run-tests.sh
new file mode 100755
index 00000000000..5268bdd7113
--- /dev/null
+++ b/ci/run-tests.sh
@@ -0,0 +1,12 @@
+#!/bin/bash -x
+
+. ~/.jabba/jabba.sh
+. ~/env.txt
+cd $(dirname "$(readlink -f "$0")")/..
+printenv | sort
+mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
+jabba use ${TEST_JAVA_VERSION}
+# Find out the latest patch version of Cassandra
+PATCH_SERVER_VERSION=$(curl -s https://downloads.apache.org/cassandra/ | grep -oP '(?<=href=\")[0-9]+\.[0-9]+\.[0-9]+(?=)' | sort -rV | uniq -w 3 | grep $SERVER_VERSION)
+printenv | sort
+mvn -B -V verify -T 1 -Ptest-jdk-${TEST_JAVA_MAJOR_VERSION} -DtestJavaHome=$(jabba which ${TEST_JAVA_VERSION}) -Dccm.version=${PATCH_SERVER_VERSION} -Dccm.dse=false -Dmaven.test.failure.ignore=true -Dmaven.javadoc.skip=true
diff --git a/core-shaded/pom.xml b/core-shaded/pom.xml
index 0cf5700b493..84cb4b15398 100644
--- a/core-shaded/pom.xml
+++ b/core-shaded/pom.xml
@@ -1,13 +1,15 @@
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
+
+
+ src/main/resources
+
+
+ ${project.basedir}/..
+
+ LICENSE
+ NOTICE_binary.txt
+ NOTICE.txt
+
+ META-INF
+
+
maven-shade-plugin
@@ -144,7 +162,7 @@
- The core driver itself; it is not relocated but needs to be included.
- All the dependencies we want to shade & relocate.
-->
- com.datastax.oss:java-driver-core
+ org.apache.cassandra:java-driver-core
io.netty:*
com.fasterxml.jackson.core:*
@@ -166,7 +184,7 @@
- com.datastax.oss:*
+ org.apache.cassandra:*
META-INF/MANIFEST.MF
@@ -202,7 +220,7 @@
- com.datastax.oss
+ org.apache.cassandra
java-driver-core-shaded
jar
${project.build.outputDirectory}
@@ -220,7 +238,7 @@
- com.datastax.oss
+ org.apache.cassandra
java-driver-core-shaded
jar
sources
@@ -256,38 +274,6 @@
-
- maven-javadoc-plugin
-
-
- attach-javadocs
-
- jar
-
-
- ${project.build.directory}/shaded-sources
- com.datastax.*.driver.internal*,com.datastax.oss.driver.shaded*
-
-
-
- org.jctools
- jctools-core
- 2.1.2
-
-
- com.esri.geometry
- esri-geometry-api
- 1.2.1
-
-
-
-
-
-
org.apache.felix
maven-bundle-plugin
diff --git a/core-shaded/src/assembly/shaded-jar.xml b/core-shaded/src/assembly/shaded-jar.xml
index a7fffda6b65..449eb77bd1a 100644
--- a/core-shaded/src/assembly/shaded-jar.xml
+++ b/core-shaded/src/assembly/shaded-jar.xml
@@ -1,13 +1,15 @@
+
+ 4.0.0
+
+ org.apache.cassandra
+ java-driver-parent
+ 4.19.3-SNAPSHOT
+
+ java-driver-distribution-source
+ pom
+ Apache Cassandra Java Driver - source distribution
+
+ apache-cassandra-java-driver-${project.version}-source
+
+
+ maven-jar-plugin
+
+
+
+ default-jar
+ none
+
+
+
+
+ maven-source-plugin
+
+ true
+
+
+
+ maven-install-plugin
+
+ true
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+
+ true
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+
+ true
+
+
+
+
+
+
+ release
+
+
+
+ maven-assembly-plugin
+
+
+ assemble-source-tarball
+ package
+
+ single
+
+
+
+
+ false
+
+ src/assembly/source-tarball.xml
+
+ posix
+
+
+
+ net.nicoulaj.maven.plugins
+ checksum-maven-plugin
+ 1.7
+
+
+
+ artifacts
+
+
+
+
+ true
+
+ sha256
+ sha512
+
+
+
+
+
+
+
+
diff --git a/distribution-source/src/assembly/source-tarball.xml b/distribution-source/src/assembly/source-tarball.xml
new file mode 100644
index 00000000000..b3e2d0f463a
--- /dev/null
+++ b/distribution-source/src/assembly/source-tarball.xml
@@ -0,0 +1,43 @@
+
+
+
+ source-tarball
+
+ tar.gz
+
+
+
+ ..
+ .
+ true
+
+
+ **/*.iml
+ **/.classpath
+ **/.project
+ **/.java-version
+ **/.flattened-pom.xml
+ **/dependency-reduced-pom.xml
+ **/${project.build.directory}/**
+
+
+
+
diff --git a/distribution-tests/pom.xml b/distribution-tests/pom.xml
new file mode 100644
index 00000000000..9cef313f8a5
--- /dev/null
+++ b/distribution-tests/pom.xml
@@ -0,0 +1,122 @@
+
+
+
+ 4.0.0
+
+ org.apache.cassandra
+ java-driver-parent
+ 4.19.3-SNAPSHOT
+
+ java-driver-distribution-tests
+ Apache Cassandra Java Driver - distribution tests
+
+
+
+ ${project.groupId}
+ java-driver-bom
+ ${project.version}
+ pom
+ import
+
+
+
+
+
+ org.apache.cassandra
+ java-driver-test-infra
+ test
+
+
+ org.apache.cassandra
+ java-driver-query-builder
+ test
+
+
+ org.apache.cassandra
+ java-driver-mapper-processor
+ test
+
+
+ org.apache.cassandra
+ java-driver-mapper-runtime
+ test
+
+
+ org.apache.cassandra
+ java-driver-core
+ test
+
+
+ org.apache.cassandra
+ java-driver-metrics-micrometer
+ test
+
+
+ org.apache.cassandra
+ java-driver-metrics-microprofile
+ test
+
+
+ junit
+ junit
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ ${testing.jvm}/bin/java
+ ${mockitoopens.argline}
+ 1
+
+
+
+ org.revapi
+ revapi-maven-plugin
+
+ true
+
+
+
+ maven-install-plugin
+
+ true
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+
+ true
+
+
+
+
+
diff --git a/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/DriverDependencyTest.java b/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/DriverDependencyTest.java
new file mode 100644
index 00000000000..16952e3d771
--- /dev/null
+++ b/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/DriverDependencyTest.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.api.core;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.datastax.oss.driver.api.core.session.Session;
+import com.datastax.oss.driver.api.mapper.MapperBuilder;
+import com.datastax.oss.driver.api.querybuilder.QueryBuilder;
+import com.datastax.oss.driver.api.testinfra.CassandraResourceRule;
+import com.datastax.oss.driver.internal.core.util.Reflection;
+import com.datastax.oss.driver.internal.mapper.processor.MapperProcessor;
+import com.datastax.oss.driver.internal.metrics.micrometer.MicrometerMetricsFactory;
+import com.datastax.oss.driver.internal.metrics.microprofile.MicroProfileMetricsFactory;
+import org.junit.Test;
+
+public class DriverDependencyTest {
+ @Test
+ public void should_include_core_jar() {
+ assertThat(Reflection.loadClass(null, "com.datastax.oss.driver.api.core.session.Session"))
+ .isEqualTo(Session.class);
+ }
+
+ @Test
+ public void should_include_query_builder_jar() {
+ assertThat(Reflection.loadClass(null, "com.datastax.oss.driver.api.querybuilder.QueryBuilder"))
+ .isEqualTo(QueryBuilder.class);
+ }
+
+ @Test
+ public void should_include_mapper_processor_jar() {
+ assertThat(
+ Reflection.loadClass(
+ null, "com.datastax.oss.driver.internal.mapper.processor.MapperProcessor"))
+ .isEqualTo(MapperProcessor.class);
+ }
+
+ @Test
+ public void should_include_mapper_runtime_jar() {
+ assertThat(Reflection.loadClass(null, "com.datastax.oss.driver.api.mapper.MapperBuilder"))
+ .isEqualTo(MapperBuilder.class);
+ }
+
+ @Test
+ public void should_include_metrics_micrometer_jar() {
+ assertThat(
+ Reflection.loadClass(
+ null,
+ "com.datastax.oss.driver.internal.metrics.micrometer.MicrometerMetricsFactory"))
+ .isEqualTo(MicrometerMetricsFactory.class);
+ }
+
+ @Test
+ public void should_include_metrics_microprofile_jar() {
+ assertThat(
+ Reflection.loadClass(
+ null,
+ "com.datastax.oss.driver.internal.metrics.microprofile.MicroProfileMetricsFactory"))
+ .isEqualTo(MicroProfileMetricsFactory.class);
+ }
+
+ @Test
+ public void should_include_test_infra_jar() {
+ assertThat(
+ Reflection.loadClass(
+ null, "com.datastax.oss.driver.api.testinfra.CassandraResourceRule"))
+ .isEqualTo(CassandraResourceRule.class);
+ }
+}
diff --git a/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/OptionalDependencyTest.java b/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/OptionalDependencyTest.java
new file mode 100644
index 00000000000..28626413487
--- /dev/null
+++ b/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/OptionalDependencyTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.api.core;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.datastax.oss.driver.internal.core.util.Dependency;
+import com.datastax.oss.driver.internal.core.util.Reflection;
+import org.junit.Test;
+
+public class OptionalDependencyTest {
+ @Test
+ public void should_not_include_snappy_jar() {
+ Dependency.SNAPPY
+ .classes()
+ .forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull());
+ }
+
+ @Test
+ public void should_not_include_l4z_jar() {
+ Dependency.LZ4
+ .classes()
+ .forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull());
+ }
+
+ @Test
+ public void should_not_include_esri_jar() {
+ Dependency.ESRI
+ .classes()
+ .forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull());
+ }
+
+ @Test
+ public void should_not_include_tinkerpop_jar() {
+ Dependency.TINKERPOP
+ .classes()
+ .forEach(clazz -> assertThat(Reflection.loadClass(null, clazz)).isNull());
+ }
+}
diff --git a/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/ProvidedDependencyTest.java b/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/ProvidedDependencyTest.java
new file mode 100644
index 00000000000..1070bbc2fb1
--- /dev/null
+++ b/distribution-tests/src/test/java/com/datastax/oss/driver/api/core/ProvidedDependencyTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.api.core;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.datastax.oss.driver.internal.core.util.Reflection;
+import org.junit.Test;
+
+public class ProvidedDependencyTest {
+ @Test
+ public void should_not_include_graal_sdk_jar() {
+ assertThat(Reflection.loadClass(null, "org.graalvm.nativeimage.VMRuntime")).isNull();
+ }
+
+ @Test
+ public void should_not_include_spotbugs_annotations_jar() {
+ assertThat(Reflection.loadClass(null, "edu.umd.cs.findbugs.annotations.NonNull")).isNull();
+ }
+
+ @Test
+ public void should_not_include_jicp_annotations_jar() {
+ assertThat(Reflection.loadClass(null, "net.jcip.annotations.ThreadSafe")).isNull();
+ }
+
+ @Test
+ public void should_not_include_blockhound_jar() {
+ assertThat(Reflection.loadClass(null, "reactor.blockhound.BlockHoundRuntime")).isNull();
+ }
+}
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 7a077be1553..20b9afc1bcd 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -1,13 +1,15 @@
jar
- DataStax Java driver for Apache Cassandra(R) - binary distribution
+ Apache Cassandra Java Driver - binary distribution
- com.datastax.oss:java-driver-query-builder
- com.datastax.oss:java-driver-mapper-runtime
- com.datastax.oss:java-driver-mapper-processor
+ org.apache.cassandra:java-driver-query-builder
+ org.apache.cassandra:java-driver-mapper-runtime
+ org.apache.cassandra:java-driver-mapper-processor
true
@@ -53,7 +55,7 @@
true
- com.datastax.oss:java-driver-query-builder
+ org.apache.cassandra:java-driver-query-builder
lib/query-builder
@@ -61,11 +63,11 @@
- com.datastax.oss:java-driver-core
- com.datastax.oss:java-driver-mapper-runtime
- com.datastax.oss:java-driver-mapper-processor
+ org.apache.cassandra:java-driver-core
+ org.apache.cassandra:java-driver-mapper-runtime
+ org.apache.cassandra:java-driver-mapper-processor
+ org.apache.cassandra:java-driver-guava-shaded
- com.datastax.oss:java-driver-shaded-guava
com.github.stephenc.jcip:jcip-annotations
com.github.spotbugs:spotbugs-annotations
@@ -78,7 +80,7 @@
true
- com.datastax.oss:java-driver-mapper-runtime
+ org.apache.cassandra:java-driver-mapper-runtime
lib/mapper-runtime
@@ -86,11 +88,11 @@
- com.datastax.oss:java-driver-core
- com.datastax.oss:java-driver-query-builder
- com.datastax.oss:java-driver-mapper-processor
+ org.apache.cassandra:java-driver-core
+ org.apache.cassandra:java-driver-query-builder
+ org.apache.cassandra:java-driver-mapper-processor
+ org.apache.cassandra:java-driver-guava-shaded
- com.datastax.oss:java-driver-shaded-guava
com.github.stephenc.jcip:jcip-annotations
com.github.spotbugs:spotbugs-annotations
@@ -103,7 +105,7 @@
true
- com.datastax.oss:java-driver-mapper-processor
+ org.apache.cassandra:java-driver-mapper-processor
lib/mapper-processor
@@ -111,11 +113,11 @@
- com.datastax.oss:java-driver-core
- com.datastax.oss:java-driver-query-builder
- com.datastax.oss:java-driver-mapper-runtime
+ org.apache.cassandra:java-driver-core
+ org.apache.cassandra:java-driver-query-builder
+ org.apache.cassandra:java-driver-mapper-runtime
+ org.apache.cassandra:java-driver-guava-shaded
- com.datastax.oss:java-driver-shaded-guava
com.github.stephenc.jcip:jcip-annotations
com.github.spotbugs:spotbugs-annotations
@@ -128,10 +130,10 @@
true
- com.datastax.oss:java-driver-core
- com.datastax.oss:java-driver-query-builder
- com.datastax.oss:java-driver-mapper-runtime
- com.datastax.oss:java-driver-mapper-processor
+ org.apache.cassandra:java-driver-core
+ org.apache.cassandra:java-driver-query-builder
+ org.apache.cassandra:java-driver-mapper-runtime
+ org.apache.cassandra:java-driver-mapper-processor
false
@@ -154,7 +156,8 @@
.
README*
- LICENSE*
+ LICENSE_binary
+ NOTICE_binary.txt
diff --git a/docs.yaml b/docs.yaml
index d7c3f1eb5b3..7c679a0f47e 100644
--- a/docs.yaml
+++ b/docs.yaml
@@ -1,5 +1,22 @@
-title: DataStax Java Driver
-summary: DataStax Java Driver for Apache Cassandra®
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+title: Java Driver
+summary: Java Driver for Apache Cassandra®
homepage: http://docs.datastax.com/en/developer/java-driver
theme: datastax
sections:
diff --git a/examples/README.md b/examples/README.md
index 83c61f27971..9d2210d8a4a 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,6 +1,25 @@
-# DataStax Java Driver for Apache Cassandra(R) - Examples
+
+
+# Java Driver for Apache Cassandra(R) - Examples
+
+This module contains examples of how to use the Java Driver for
Apache Cassandra(R).
## Usage
diff --git a/examples/pom.xml b/examples/pom.xml
index 21417669a5f..12e42dfdf53 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -1,13 +1,15 @@
+
## Frequently asked questions
### I'm modifying a statement and the changes get ignored, why?
diff --git a/guava-shaded/pom.xml b/guava-shaded/pom.xml
new file mode 100644
index 00000000000..da2e82e0ab0
--- /dev/null
+++ b/guava-shaded/pom.xml
@@ -0,0 +1,242 @@
+
+
+
+ 4.0.0
+
+ org.apache.cassandra
+ java-driver-parent
+ 4.19.3-SNAPSHOT
+
+ java-driver-guava-shaded
+ Apache Cassandra Java Driver - guava shaded dep
+ Shaded Guava artifact for use in the Java driver for Apache Cassandra®
+
+
+ com.google.guava
+ guava
+
+
+ com.google.code.findbugs
+ jsr305
+
+
+ org.checkerframework
+ checker-qual
+
+
+ com.google.errorprone
+ error_prone_annotations
+
+
+ true
+
+
+ org.graalvm.nativeimage
+ svm
+ 20.0.0
+ provided
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.12
+
+
+ regex-property
+
+ regex-property
+
+
+ maven.main.skip
+ ${java.version}
+ ^(?!1.8).+
+ true
+ false
+
+
+
+
+
+ maven-shade-plugin
+
+
+ shade-guava-dependency
+ package
+
+ shade
+
+
+
+
+ org.apache.cassandra:java-driver-guava-shaded
+ com.google.guava:guava
+ com.google.guava:failureaccess
+ com.google.j2objc:j2objc-annotations
+
+
+
+
+ com.google
+ com.datastax.oss.driver.shaded.guava
+
+
+
+
+ com.google.guava:*
+
+ META-INF/**
+
+
+
+ true
+ true
+
+
+
+
+
+
+ maven-clean-plugin
+
+
+ clean-classes
+ package
+
+ clean
+
+
+ ${project.build.outputDirectory}
+
+
+
+
+
+ maven-dependency-plugin
+
+
+ unpack-shaded-classes
+ package
+
+ unpack
+
+
+ ${project.build.outputDirectory}
+
+
+ org.apache.cassandra
+ java-driver-guava-shaded
+ ${project.version}
+ jar
+
+
+
+
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+
+ 3.5.0
+ true
+
+
+ generate-shaded-manifest
+ package
+
+ manifest
+
+
+
+ com.datastax.oss.driver.shaded.guava
+ !com.datastax.oss.driver.shaded.guava.errorprone.*, !org.checkerframework.*, *
+ javax.annotation.*;resolution:=optional;version="[3.0,4)", javax.crypto.*;resolution:=optional, sun.misc.*;resolution:=optional, !com.oracle.svm.*, !com.datastax.oss.driver.shaded.guava.errorprone.*, !org.checkerframework.*, *
+
+
+
+
+
+
+ maven-assembly-plugin
+
+
+ generate-final-shaded-jar
+ package
+
+ single
+
+
+
+
+ ${project.build.outputDirectory}/META-INF/MANIFEST.MF
+
+
+ src/assembly/shaded-jar.xml
+
+
+ false
+
+
+
+
+
+ maven-jar-plugin
+
+
+ empty-javadoc-jar
+
+ jar
+
+
+ javadoc
+ ${basedir}/src/main/javadoc
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+
+ true
+
+
+
+
+
diff --git a/guava-shaded/src/assembly/shaded-jar.xml b/guava-shaded/src/assembly/shaded-jar.xml
new file mode 100644
index 00000000000..d762a27b20f
--- /dev/null
+++ b/guava-shaded/src/assembly/shaded-jar.xml
@@ -0,0 +1,48 @@
+
+
+
+ shaded-jar
+
+ jar
+
+ false
+
+
+
+ ${project.build.outputDirectory}
+
+ META-INF/maven/org.apache.cassandra/java-driver-guava-shaded/pom.xml
+
+
+
+
+
+
+
+ ${project.basedir}/dependency-reduced-pom.xml
+ META-INF/maven/org.apache.cassandra/java-driver-guava-shaded
+ pom.xml
+
+
+
diff --git a/guava-shaded/src/main/java/com/google/common/primitives/LexicographicalComparatorHolderSubstitution.java b/guava-shaded/src/main/java/com/google/common/primitives/LexicographicalComparatorHolderSubstitution.java
new file mode 100644
index 00000000000..95e9c70cdbc
--- /dev/null
+++ b/guava-shaded/src/main/java/com/google/common/primitives/LexicographicalComparatorHolderSubstitution.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.common.primitives;
+
+import com.oracle.svm.core.annotate.Alias;
+import com.oracle.svm.core.annotate.RecomputeFieldValue;
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+import java.util.Comparator;
+
+@TargetClass(UnsignedBytes.LexicographicalComparatorHolder.class)
+final class LexicographicalComparatorHolderSubstitution {
+
+ @Alias
+ @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias)
+ static Comparator BEST_COMPARATOR = UnsignedBytes.lexicographicalComparatorJavaImpl();
+
+ /* All known cases should be covered by the field substitution above... keeping this only
+ * for sake of completeness */
+ @Substitute
+ static Comparator getBestComparator() {
+ return UnsignedBytes.lexicographicalComparatorJavaImpl();
+ }
+}
diff --git a/guava-shaded/src/main/java/com/google/common/primitives/UnsafeComparatorSubstitution.java b/guava-shaded/src/main/java/com/google/common/primitives/UnsafeComparatorSubstitution.java
new file mode 100644
index 00000000000..549de0b5c02
--- /dev/null
+++ b/guava-shaded/src/main/java/com/google/common/primitives/UnsafeComparatorSubstitution.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.common.primitives;
+
+import com.oracle.svm.core.annotate.Delete;
+import com.oracle.svm.core.annotate.TargetClass;
+
+@TargetClass(UnsignedBytes.LexicographicalComparatorHolder.UnsafeComparator.class)
+@Delete
+final class UnsafeComparatorSubstitution {}
diff --git a/guava-shaded/src/main/javadoc/README.txt b/guava-shaded/src/main/javadoc/README.txt
new file mode 100644
index 00000000000..57f82b2a265
--- /dev/null
+++ b/guava-shaded/src/main/javadoc/README.txt
@@ -0,0 +1,2 @@
+This empty JAR is generated for compliance with Maven Central rules. Please refer to the original
+Guava API docs.
\ No newline at end of file
diff --git a/install-snapshots.sh b/install-snapshots.sh
index 4f5d79665ab..795b4098f52 100755
--- a/install-snapshots.sh
+++ b/install-snapshots.sh
@@ -1,4 +1,20 @@
#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
# Install dependencies in the Travis build environment if they are snapshots.
# See .travis.yml
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 17e4ff393ef..e302e12077f 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -1,13 +1,15 @@
- -XX:+AllowRedefinitionToAddDeleteMethods
-
-
-
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderAlternateIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderAlternateIT.java
index 3b56e3edf65..55c420e276b 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderAlternateIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderAlternateIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,7 +24,8 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.cql.Row;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap;
import com.tngtech.java.junit.dataprovider.DataProvider;
@@ -32,7 +35,10 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-@DseRequirement(min = "5.0", description = "Required for DseAuthenticator")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0",
+ description = "Required for DseAuthenticator")
@RunWith(DataProviderRunner.class)
public class DseGssApiAuthProviderAlternateIT {
@ClassRule public static EmbeddedAdsRule ads = new EmbeddedAdsRule(true);
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderIT.java
index b8884e68b27..4ee28d62367 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,7 +26,8 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.auth.AuthenticationException;
import com.datastax.oss.driver.api.core.cql.ResultSet;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap;
import java.util.List;
import java.util.Map;
@@ -32,7 +35,10 @@
import org.junit.ClassRule;
import org.junit.Test;
-@DseRequirement(min = "5.0", description = "Required for DseAuthenticator")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0",
+ description = "Required for DseAuthenticator")
public class DseGssApiAuthProviderIT {
@ClassRule public static EmbeddedAdsRule ads = new EmbeddedAdsRule();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DsePlainTextAuthProviderIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DsePlainTextAuthProviderIT.java
index 08629a1f17e..256c18f841d 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DsePlainTextAuthProviderIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DsePlainTextAuthProviderIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,8 +26,9 @@
import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.auth.AuthenticationException;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.auth.PlainTextAuthProvider;
import com.datastax.oss.driver.shaded.guava.common.util.concurrent.Uninterruptibles;
@@ -35,7 +38,10 @@
import org.junit.ClassRule;
import org.junit.Test;
-@DseRequirement(min = "5.0", description = "Required for DseAuthenticator")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0",
+ description = "Required for DseAuthenticator")
public class DsePlainTextAuthProviderIT {
@ClassRule
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseProxyAuthenticationIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseProxyAuthenticationIT.java
index 7b4bf6be433..a3f1c04afc0 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseProxyAuthenticationIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/DseProxyAuthenticationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,7 +29,9 @@
import com.datastax.oss.driver.api.core.cql.ResultSet;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.servererrors.UnauthorizedException;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.auth.PlainTextAuthProvider;
import java.util.List;
@@ -36,7 +40,10 @@
import org.junit.ClassRule;
import org.junit.Test;
-@DseRequirement(min = "5.1", description = "Required for DseAuthenticator with proxy")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1",
+ description = "Required for DseAuthenticator with proxy")
public class DseProxyAuthenticationIT {
private static String bobPrincipal;
private static String charliePrincipal;
@@ -51,33 +58,38 @@ public static void addUsers() {
@Before
public void setupRoles() {
- try (CqlSession session = ads.newKeyTabSession()) {
- session.execute(
- "CREATE ROLE IF NOT EXISTS alice WITH PASSWORD = 'fakePasswordForAlice' AND LOGIN = FALSE");
- session.execute(
- "CREATE ROLE IF NOT EXISTS ben WITH PASSWORD = 'fakePasswordForBen' AND LOGIN = TRUE");
- session.execute("CREATE ROLE IF NOT EXISTS 'bob@DATASTAX.COM' WITH LOGIN = TRUE");
- session.execute(
- "CREATE ROLE IF NOT EXISTS 'charlie@DATASTAX.COM' WITH PASSWORD = 'fakePasswordForCharlie' AND LOGIN = TRUE");
- session.execute(
- "CREATE ROLE IF NOT EXISTS steve WITH PASSWORD = 'fakePasswordForSteve' AND LOGIN = TRUE");
- session.execute(
- "CREATE KEYSPACE IF NOT EXISTS aliceks WITH REPLICATION = {'class':'SimpleStrategy', 'replication_factor':'1'}");
- session.execute(
- "CREATE TABLE IF NOT EXISTS aliceks.alicetable (key text PRIMARY KEY, value text)");
- session.execute("INSERT INTO aliceks.alicetable (key, value) VALUES ('hello', 'world')");
- session.execute("GRANT ALL ON KEYSPACE aliceks TO alice");
- session.execute("GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'ben'");
- session.execute("GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'bob@DATASTAX.COM'");
- session.execute("GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'steve'");
- session.execute("GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'charlie@DATASTAX.COM'");
- session.execute("GRANT PROXY.LOGIN ON ROLE 'alice' TO 'ben'");
- session.execute("GRANT PROXY.LOGIN ON ROLE 'alice' TO 'bob@DATASTAX.COM'");
- session.execute("GRANT PROXY.EXECUTE ON ROLE 'alice' TO 'steve'");
- session.execute("GRANT PROXY.EXECUTE ON ROLE 'alice' TO 'charlie@DATASTAX.COM'");
- // ben and bob are allowed to login as alice, but not execute as alice.
- // charlie and steve are allowed to execute as alice, but not login as alice.
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ try (CqlSession session = ads.newKeyTabSession()) {
+ session.execute(
+ "CREATE ROLE IF NOT EXISTS alice WITH PASSWORD = 'fakePasswordForAlice' AND LOGIN = FALSE");
+ session.execute(
+ "CREATE ROLE IF NOT EXISTS ben WITH PASSWORD = 'fakePasswordForBen' AND LOGIN = TRUE");
+ session.execute("CREATE ROLE IF NOT EXISTS 'bob@DATASTAX.COM' WITH LOGIN = TRUE");
+ session.execute(
+ "CREATE ROLE IF NOT EXISTS 'charlie@DATASTAX.COM' WITH PASSWORD = 'fakePasswordForCharlie' AND LOGIN = TRUE");
+ session.execute(
+ "CREATE ROLE IF NOT EXISTS steve WITH PASSWORD = 'fakePasswordForSteve' AND LOGIN = TRUE");
+ session.execute(
+ "CREATE KEYSPACE IF NOT EXISTS aliceks WITH REPLICATION = {'class':'SimpleStrategy', 'replication_factor':'1'}");
+ session.execute(
+ "CREATE TABLE IF NOT EXISTS aliceks.alicetable (key text PRIMARY KEY, value text)");
+ session.execute(
+ "INSERT INTO aliceks.alicetable (key, value) VALUES ('hello', 'world')");
+ session.execute("GRANT ALL ON KEYSPACE aliceks TO alice");
+ session.execute("GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'ben'");
+ session.execute("GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'bob@DATASTAX.COM'");
+ session.execute("GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'steve'");
+ session.execute(
+ "GRANT EXECUTE ON ALL AUTHENTICATION SCHEMES TO 'charlie@DATASTAX.COM'");
+ session.execute("GRANT PROXY.LOGIN ON ROLE 'alice' TO 'ben'");
+ session.execute("GRANT PROXY.LOGIN ON ROLE 'alice' TO 'bob@DATASTAX.COM'");
+ session.execute("GRANT PROXY.EXECUTE ON ROLE 'alice' TO 'steve'");
+ session.execute("GRANT PROXY.EXECUTE ON ROLE 'alice' TO 'charlie@DATASTAX.COM'");
+ // ben and bob are allowed to login as alice, but not execute as alice.
+ // charlie and steve are allowed to execute as alice, but not login as alice.
+ }
+ });
}
/**
* Validates that a connection may be successfully made as user 'alice' using the credentials of a
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAds.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAds.java
index c3d7dce18cc..5ca751e9151 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAds.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAds.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAdsRule.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAdsRule.java
index cbec842a2cf..a57e349a51b 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAdsRule.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAdsRule.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,11 +20,9 @@
import com.datastax.dse.driver.api.core.config.DseDriverOption;
import com.datastax.dse.driver.internal.core.auth.DseGssApiAuthProvider;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
-import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirementRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap;
import java.io.File;
@@ -151,50 +151,20 @@ protected void before() {
}
}
- private Statement buildErrorStatement(
- Version requirement, Version actual, String description, boolean lessThan) {
- return new Statement() {
-
- @Override
- public void evaluate() {
- throw new AssumptionViolatedException(
- String.format(
- "Test requires %s %s %s but %s is configured. Description: %s",
- lessThan ? "less than" : "at least", "DSE", requirement, actual, description));
- }
- };
- }
-
@Override
public Statement apply(Statement base, Description description) {
- DseRequirement dseRequirement = description.getAnnotation(DseRequirement.class);
- if (dseRequirement != null) {
- if (!CcmBridge.DSE_ENABLEMENT) {
- return new Statement() {
- @Override
- public void evaluate() {
- throw new AssumptionViolatedException("Test Requires DSE but C* is configured.");
- }
- };
- } else {
- Version dseVersion = CcmBridge.VERSION;
- if (!dseRequirement.min().isEmpty()) {
- Version minVersion = Version.parse(dseRequirement.min());
- if (minVersion.compareTo(dseVersion) > 0) {
- return buildErrorStatement(dseVersion, dseVersion, dseRequirement.description(), false);
- }
+ if (BackendRequirementRule.meetsDescriptionRequirements(description)) {
+ return super.apply(base, description);
+ } else {
+ // requirements not met, throw reasoning assumption to skip test
+ return new Statement() {
+ @Override
+ public void evaluate() {
+ throw new AssumptionViolatedException(
+ BackendRequirementRule.buildReasonString(description));
}
-
- if (!dseRequirement.max().isEmpty()) {
- Version maxVersion = Version.parse(dseRequirement.max());
-
- if (maxVersion.compareTo(dseVersion) <= 0) {
- return buildErrorStatement(dseVersion, dseVersion, dseRequirement.description(), true);
- }
- }
- }
+ };
}
- return super.apply(base, description);
}
@Override
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/KerberosUtils.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/KerberosUtils.java
index 8876d07424e..5d385b51c92 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/KerberosUtils.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/KerberosUtils.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java
index a0a3aaf3cf5..45cc84f0719 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,8 +32,9 @@
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.cql.Statement;
import com.datastax.oss.driver.api.core.metrics.DefaultNodeMetric;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -43,7 +46,6 @@
import java.time.Duration;
import java.util.Collections;
import java.util.Iterator;
-import java.util.Objects;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
@@ -58,8 +60,9 @@
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
-@DseRequirement(
- min = "5.1.0",
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1.0",
description = "Continuous paging is only available from 5.1.0 onwards")
@Category(ParallelizableTests.class)
@RunWith(DataProviderRunner.class)
@@ -277,11 +280,8 @@ public void prepared_statement_paging_should_be_resilient_to_schema_change() {
// dropped.
Row row = it.next();
assertThat(row.getString("k")).isNotNull();
- if (ccmRule
- .getDseVersion()
- .orElseThrow(IllegalStateException::new)
- .compareTo(Objects.requireNonNull(Version.parse("6.0.0")))
- >= 0) {
+ if (ccmRule.isDistributionOf(
+ BackendType.DSE, (dist, cass) -> dist.compareTo(Version.parse("6.0.0")) >= 0)) {
// DSE 6 only, v should be null here since dropped.
// Not reliable for 5.1 since we may have gotten page queued before schema changed.
assertThat(row.isNull("v")).isTrue();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingITBase.java
index 58a76fe1c61..4a68454d559 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/ContinuousPagingITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousPagingReactiveIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousPagingReactiveIT.java
index 927a3dfc286..f2a28d72597 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousPagingReactiveIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousPagingReactiveIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,8 +29,9 @@
import com.datastax.oss.driver.api.core.cql.ExecutionInfo;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.metrics.DefaultNodeMetric;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -47,8 +50,9 @@
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
-@DseRequirement(
- min = "5.1.0",
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1.0",
description = "Continuous paging is only available from 5.1.0 onwards")
@Category(ParallelizableTests.class)
@RunWith(DataProviderRunner.class)
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/GeometryIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/GeometryIT.java
index 5ef55b2fa63..83b01796337 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/GeometryIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/GeometryIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/LineStringIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/LineStringIT.java
index 2261c3fae2d..c626f0e26c6 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/LineStringIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/LineStringIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +24,9 @@
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.uuid.Uuids;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import java.util.List;
import java.util.UUID;
@@ -34,7 +37,7 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0")
+@BackendRequirement(type = BackendType.DSE, minInclusive = "5.0")
public class LineStringIT extends GeometryIT {
private static CcmRule ccm = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PointIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PointIT.java
index fcb3a3b5ae4..b81049cd444 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PointIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PointIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,8 +18,9 @@
package com.datastax.dse.driver.api.core.data.geometry;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.assertj.core.util.Lists;
import org.junit.BeforeClass;
@@ -25,7 +28,7 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0")
+@BackendRequirement(type = BackendType.DSE, minInclusive = "5.0")
public class PointIT extends GeometryIT {
private static CcmRule ccm = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PolygonIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PolygonIT.java
index 9d7bfc3292f..1d9d49bd776 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PolygonIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/geometry/PolygonIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +24,9 @@
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.uuid.Uuids;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import java.util.UUID;
import org.assertj.core.util.Lists;
@@ -33,7 +36,7 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0")
+@BackendRequirement(type = BackendType.DSE, minInclusive = "5.0")
public class PolygonIT extends GeometryIT {
private static CcmRule ccm = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/time/DateRangeIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/time/DateRangeIT.java
index 958fac68ab9..9b2370e3376 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/time/DateRangeIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/data/time/DateRangeIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,8 +27,9 @@
import com.datastax.oss.driver.api.core.data.TupleValue;
import com.datastax.oss.driver.api.core.data.UdtValue;
import com.datastax.oss.driver.api.core.servererrors.InvalidQueryException;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -44,7 +47,7 @@
import org.junit.rules.TestRule;
@Category({ParallelizableTests.class})
-@DseRequirement(min = "5.1")
+@BackendRequirement(type = BackendType.DSE, minInclusive = "5.1")
public class DateRangeIT {
private static CcmRule ccmRule = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphDataTypeITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphDataTypeITBase.java
index 7251a88fe4f..d42b156a8be 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphDataTypeITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphDataTypeITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphGeoSearchIndexIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphGeoSearchIndexIT.java
index df4c3385a79..9878f1186e6 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphGeoSearchIndexIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphGeoSearchIndexIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,8 +18,9 @@
package com.datastax.dse.driver.api.core.graph;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.shaded.guava.common.base.Joiner;
import com.datastax.oss.driver.shaded.guava.common.collect.Lists;
@@ -30,7 +33,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.1", description = "DSE 5.1 required for graph geo indexing")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1",
+ description = "DSE 5.1 required for graph geo indexing")
public class ClassicGraphGeoSearchIndexIT extends GraphGeoSearchIndexITBase {
private static final CustomCcmRule CCM_RULE =
CustomCcmRule.builder().withDseWorkloads("graph", "solr").build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphTextSearchIndexIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphTextSearchIndexIT.java
index 315c092f682..13d503d6b25 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphTextSearchIndexIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/ClassicGraphTextSearchIndexIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,8 +18,9 @@
package com.datastax.dse.driver.api.core.graph;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.shaded.guava.common.base.Joiner;
import com.datastax.oss.driver.shaded.guava.common.collect.Lists;
@@ -30,7 +33,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.1", description = "DSE 5.1 required for graph geo indexing")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1",
+ description = "DSE 5.1 required for graph geo indexing")
public class ClassicGraphTextSearchIndexIT extends GraphTextSearchIndexITBase {
private static final CustomCcmRule CCM_RULE =
CustomCcmRule.builder().withDseWorkloads("graph", "solr").build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphDataTypeITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphDataTypeITBase.java
index 5273367ace0..7fe31a059d7 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphDataTypeITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphDataTypeITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphGeoSearchIndexIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphGeoSearchIndexIT.java
index 42b0e3378a5..12db8820117 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphGeoSearchIndexIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphGeoSearchIndexIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,8 +18,9 @@
package com.datastax.dse.driver.api.core.graph;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.shaded.guava.common.collect.Lists;
import java.util.Collection;
@@ -28,7 +31,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8.0 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8.0 required for Core graph support")
public class CoreGraphGeoSearchIndexIT extends GraphGeoSearchIndexITBase {
private static final CustomCcmRule CCM_RULE =
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphTextSearchIndexIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphTextSearchIndexIT.java
index 9617746e026..5545c3c00ac 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphTextSearchIndexIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CoreGraphTextSearchIndexIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,8 +18,9 @@
package com.datastax.dse.driver.api.core.graph;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.shaded.guava.common.collect.Lists;
import java.util.Collection;
@@ -28,7 +31,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8.0 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8.0 required for Core graph support")
public class CoreGraphTextSearchIndexIT extends GraphTextSearchIndexITBase {
private static final CustomCcmRule CCM_RULE =
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CqlCollectionIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CqlCollectionIT.java
index ee8d4ac943d..8bc497c37db 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CqlCollectionIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/CqlCollectionIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +24,9 @@
import com.datastax.dse.driver.api.core.graph.predicates.CqlCollection;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.CqlSessionRuleBuilder;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
@@ -41,7 +44,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.8", description = "DSE 6.8.0 required for collection predicates support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8",
+ description = "DSE 6.8.0 required for collection predicates support")
public class CqlCollectionIT {
private static final CustomCcmRule CCM_RULE =
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphAuthenticationIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphAuthenticationIT.java
index aaaafc26248..de1c23fd661 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphAuthenticationIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphAuthenticationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +24,9 @@
import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.auth.PlainTextAuthProvider;
import com.datastax.oss.driver.shaded.guava.common.util.concurrent.Uninterruptibles;
@@ -32,7 +35,10 @@
import org.junit.ClassRule;
import org.junit.Test;
-@DseRequirement(min = "5.0.0", description = "DSE 5 required for Graph")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.0",
+ description = "DSE 5 required for Graph")
public class GraphAuthenticationIT {
@ClassRule
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphGeoSearchIndexITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphGeoSearchIndexITBase.java
index 52333be3cea..67d0cb34d43 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphGeoSearchIndexITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphGeoSearchIndexITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphPagingIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphPagingIT.java
index 335aceb9b84..01938c34e07 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphPagingIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphPagingIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -32,8 +34,9 @@
import com.datastax.oss.driver.api.core.cql.ExecutionInfo;
import com.datastax.oss.driver.api.core.metadata.Node;
import com.datastax.oss.driver.api.core.metrics.Metrics;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.util.CountingIterator;
@@ -53,7 +56,10 @@
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
-@DseRequirement(min = "6.8.0", description = "Graph paging requires DSE 6.8+")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "Graph paging requires DSE 6.8+")
@RunWith(DataProviderRunner.class)
public class GraphPagingIT {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphSpeculativeExecutionIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphSpeculativeExecutionIT.java
index fcacddb787f..130e9a17cc1 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphSpeculativeExecutionIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphSpeculativeExecutionIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.dse.driver.api.core.config.DseDriverOption;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.specex.ConstantSpeculativeExecutionPolicy;
import com.datastax.oss.driver.internal.core.specex.NoSpeculativeExecutionPolicy;
@@ -33,7 +36,10 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8 required for graph paging")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8 required for graph paging")
@RunWith(DataProviderRunner.class)
public class GraphSpeculativeExecutionIT {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTestSupport.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTestSupport.java
index 8af5da5d1ed..6508be38175 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTestSupport.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTestSupport.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTextSearchIndexITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTextSearchIndexITBase.java
index 9a8b3d2eedc..d70d206715e 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTextSearchIndexITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTextSearchIndexITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,7 +20,8 @@
import static org.assertj.core.api.Assertions.assertThat;
import com.datastax.dse.driver.api.core.graph.predicates.Search;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.tngtech.java.junit.dataprovider.DataProvider;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
import com.tngtech.java.junit.dataprovider.UseDataProvider;
@@ -102,7 +105,7 @@ public void search_by_regex(String indexType) {
*/
@UseDataProvider("indexTypes")
@Test
- @DseRequirement(min = "5.1.0")
+ @BackendRequirement(type = BackendType.DSE, minInclusive = "5.1.0")
public void search_by_fuzzy(String indexType) {
// Alias matches 'awrio' fuzzy
GraphTraversal traversal =
@@ -185,7 +188,7 @@ public void search_by_token_regex(String indexType) {
*/
@UseDataProvider("indexTypes")
@Test
- @DseRequirement(min = "5.1.0")
+ @BackendRequirement(type = BackendType.DSE, minInclusive = "5.1.0")
public void search_by_token_fuzzy(String indexType) {
// Description containing 'lives' fuzzy
GraphTraversal traversal =
@@ -210,7 +213,7 @@ public void search_by_token_fuzzy(String indexType) {
*/
@UseDataProvider("indexTypes")
@Test
- @DseRequirement(min = "5.1.0")
+ @BackendRequirement(type = BackendType.DSE, minInclusive = "5.1.0")
public void search_by_phrase(String indexType) {
// Full name contains phrase "Paul Joe"
GraphTraversal traversal =
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTimeoutsIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTimeoutsIT.java
index 4b8ec8d2d19..d2b58cc0f9c 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTimeoutsIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/GraphTimeoutsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,8 +26,9 @@
import com.datastax.oss.driver.api.core.DriverTimeoutException;
import com.datastax.oss.driver.api.core.config.DriverExecutionProfile;
import com.datastax.oss.driver.api.core.servererrors.InvalidQueryException;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import java.time.Duration;
import org.junit.ClassRule;
@@ -33,7 +36,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0.0", description = "DSE 5 required for Graph")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.0",
+ description = "DSE 5 required for Graph")
public class GraphTimeoutsIT {
public static CustomCcmRule ccmRule = CustomCcmRule.builder().withDseWorkloads("graph").build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SampleGraphScripts.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SampleGraphScripts.java
index b5b66217410..19ff957736a 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SampleGraphScripts.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SampleGraphScripts.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalDsl.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalDsl.java
index c14c9e80f67..327f32a240d 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalDsl.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalDsl.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalSourceDsl.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalSourceDsl.java
index 33e1d78a04c..e61b94e2d09 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalSourceDsl.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/SocialTraversalSourceDsl.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerEdgeAssert.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerEdgeAssert.java
index efd2927a4da..e3cc8cb687b 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerEdgeAssert.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerEdgeAssert.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerElementAssert.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerElementAssert.java
index ff0ef40a3a4..f54cec3065a 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerElementAssert.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerElementAssert.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerGraphAssertions.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerGraphAssertions.java
index 6555f41a772..9c38a58db4c 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerGraphAssertions.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerGraphAssertions.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerPathAssert.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerPathAssert.java
index fe1e7273485..30f8f5fffa4 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerPathAssert.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerPathAssert.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerTreeAssert.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerTreeAssert.java
index d5f5484dc98..6196e0a1021 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerTreeAssert.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerTreeAssert.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexAssert.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexAssert.java
index de0bfdbc863..3777fc8e96a 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexAssert.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexAssert.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexPropertyAssert.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexPropertyAssert.java
index a8dff9a72ec..40bb8b5e239 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexPropertyAssert.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/TinkerVertexPropertyAssert.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/reactive/DefaultReactiveGraphResultSetIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/reactive/DefaultReactiveGraphResultSetIT.java
index 9c46891b4ab..b4c8bb05df4 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/reactive/DefaultReactiveGraphResultSetIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/reactive/DefaultReactiveGraphResultSetIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,8 +25,9 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DriverExecutionProfile;
import com.datastax.oss.driver.api.core.cql.ExecutionInfo;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.tngtech.java.junit.dataprovider.DataProvider;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
@@ -39,7 +42,10 @@
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
-@DseRequirement(min = "6.8.0", description = "Graph paging requires DSE 6.8+")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "Graph paging requires DSE 6.8+")
@RunWith(DataProviderRunner.class)
public class DefaultReactiveGraphResultSetIT {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphDataTypeRemoteIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphDataTypeRemoteIT.java
index 5eb70d01604..b57d7a952bc 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphDataTypeRemoteIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphDataTypeRemoteIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,8 +23,9 @@
import com.datastax.dse.driver.api.core.graph.SampleGraphScripts;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
@@ -32,7 +35,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0.3", description = "DSE 5.0.3 required for remote TinkerPop support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.3",
+ description = "DSE 5.0.3 required for remote TinkerPop support")
public class ClassicGraphDataTypeRemoteIT extends ClassicGraphDataTypeITBase {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphTraversalRemoteIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphTraversalRemoteIT.java
index a855d38333a..de85b6af267 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphTraversalRemoteIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/ClassicGraphTraversalRemoteIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,8 +25,9 @@
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.dse.driver.api.core.graph.SocialTraversalSource;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.junit.BeforeClass;
@@ -32,8 +35,9 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(
- min = "5.0.9",
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.9",
description = "DSE 5.0.9 required for inserting edges and vertices script.")
public class ClassicGraphTraversalRemoteIT extends GraphTraversalRemoteITBase {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphDataTypeRemoteIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphDataTypeRemoteIT.java
index 40deb724757..88b9cdc0433 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphDataTypeRemoteIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphDataTypeRemoteIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,8 +23,9 @@
import com.datastax.dse.driver.api.core.graph.DseGraph;
import com.datastax.dse.driver.api.core.graph.GraphTestSupport;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
import java.util.Map;
@@ -35,7 +38,10 @@
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8.0 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8.0 required for Core graph support")
@RunWith(DataProviderRunner.class)
public class CoreGraphDataTypeRemoteIT extends CoreGraphDataTypeITBase {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphTraversalRemoteIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphTraversalRemoteIT.java
index dfd45cdfb8e..2bbdf1f6d45 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphTraversalRemoteIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/CoreGraphTraversalRemoteIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,8 +25,9 @@
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.dse.driver.api.core.graph.SocialTraversalSource;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.junit.BeforeClass;
@@ -32,7 +35,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.8", description = "DSE 6.8 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8",
+ description = "DSE 6.8 required for Core graph support")
public class CoreGraphTraversalRemoteIT extends GraphTraversalRemoteITBase {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMetaPropertiesRemoteIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMetaPropertiesRemoteIT.java
index a40b7c6d397..2966fb44cf9 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMetaPropertiesRemoteIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMetaPropertiesRemoteIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,8 +25,9 @@
import com.datastax.dse.driver.api.core.graph.GraphTestSupport;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
@@ -37,7 +40,10 @@
// INFO: meta props are going away in NGDG
-@DseRequirement(min = "5.0.3", description = "DSE 5.0.3 required for remote TinkerPop support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.3",
+ description = "DSE 5.0.3 required for remote TinkerPop support")
public class GraphTraversalMetaPropertiesRemoteIT {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMultiPropertiesRemoteIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMultiPropertiesRemoteIT.java
index 6dcd6bda336..c55a7b67c4a 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMultiPropertiesRemoteIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalMultiPropertiesRemoteIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,8 +25,9 @@
import com.datastax.dse.driver.api.core.graph.GraphTestSupport;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import java.util.Iterator;
import org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource;
@@ -37,7 +40,10 @@
import org.junit.rules.TestRule;
// INFO: multi props are not supported in Core
-@DseRequirement(min = "5.0.3", description = "DSE 5.0.3 required for remote TinkerPop support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.3",
+ description = "DSE 5.0.3 required for remote TinkerPop support")
public class GraphTraversalMultiPropertiesRemoteIT {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalRemoteITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalRemoteITBase.java
index 4177f5a1477..3db8a7d1a12 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalRemoteITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/remote/GraphTraversalRemoteITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,8 +30,10 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.servererrors.InvalidQueryException;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
+import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -583,7 +587,7 @@ public void should_handle_asynchronous_execution_graph_binary() {
* @test_category dse:graph
*/
@Test
- @DseRequirement(min = "5.1.0")
+ @BackendRequirement(type = BackendType.DSE, minInclusive = "5.1.0")
public void should_fail_future_returned_from_promise_on_query_error() throws Exception {
CompletableFuture> future =
graphTraversalSource().V("invalidid").peerPressure().promise(Traversal::next);
@@ -640,9 +644,9 @@ public void should_allow_use_of_dsl_graph_binary() {
*/
@Test
public void should_return_correct_results_when_bulked() {
- Optional dseVersion = ccmRule().getCcmBridge().getDseVersion();
Assumptions.assumeThat(
- dseVersion.isPresent() && dseVersion.get().compareTo(Version.parse("5.1.2")) > 0)
+ CcmBridge.isDistributionOf(
+ BackendType.DSE, (dist, cass) -> dist.compareTo(Version.parse("5.1.2")) > 0))
.isTrue();
List results = graphTraversalSource().E().label().barrier().toList();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeFluentIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeFluentIT.java
index 35c05deb01f..d1355100c4b 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeFluentIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeFluentIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +24,9 @@
import com.datastax.dse.driver.api.core.graph.SampleGraphScripts;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.BeforeClass;
@@ -31,7 +34,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0.3", description = "DSE 5.0.3 required for fluent API support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.3",
+ description = "DSE 5.0.3 required for fluent API support")
public class ClassicGraphDataTypeFluentIT extends ClassicGraphDataTypeITBase {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.CCM_BUILDER_WITH_GRAPH.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeScriptIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeScriptIT.java
index 9a12e5ca54a..81f088d0c18 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeScriptIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphDataTypeScriptIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.dse.driver.api.core.graph.SampleGraphScripts;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.BeforeClass;
@@ -29,7 +32,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0.4", description = "DSE 5.0.4 required for script API with GraphSON 2")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.4",
+ description = "DSE 5.0.4 required for script API with GraphSON 2")
public class ClassicGraphDataTypeScriptIT extends ClassicGraphDataTypeITBase {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.CCM_BUILDER_WITH_GRAPH.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalBatchIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalBatchIT.java
index 780d8af6ed4..81f39753856 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalBatchIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalBatchIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,8 +21,9 @@
import com.datastax.dse.driver.api.core.graph.SampleGraphScripts;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
@@ -29,7 +32,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.0", description = "DSE 6.0 required for BatchGraphStatement.")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.0",
+ description = "DSE 6.0 required for BatchGraphStatement.")
public class ClassicGraphTraversalBatchIT extends GraphTraversalBatchITBase {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalIT.java
index f1dd053692b..672e1b6f679 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/ClassicGraphTraversalIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.dse.driver.api.core.graph.SocialTraversalSource;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
@@ -30,8 +33,9 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(
- min = "5.0.9",
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.9",
description = "DSE 5.0.9 required for inserting edges and vertices script.")
public class ClassicGraphTraversalIT extends GraphTraversalITBase {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeFluentIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeFluentIT.java
index 613aa006005..94e6415f471 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeFluentIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeFluentIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +24,9 @@
import com.datastax.dse.driver.api.core.graph.FluentGraphStatement;
import com.datastax.dse.driver.api.core.graph.GraphTestSupport;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
import java.util.Map;
@@ -34,7 +37,10 @@
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8.0 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8.0 required for Core graph support")
@RunWith(DataProviderRunner.class)
public class CoreGraphDataTypeFluentIT extends CoreGraphDataTypeITBase {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeScriptIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeScriptIT.java
index 3bb73739f3e..b79aecf6c6a 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeScriptIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphDataTypeScriptIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatementBuilder;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
import java.util.Map;
@@ -30,7 +33,10 @@
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8.0 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8.0 required for Core graph support")
@RunWith(DataProviderRunner.class)
public class CoreGraphDataTypeScriptIT extends CoreGraphDataTypeITBase {
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalBatchIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalBatchIT.java
index 51f50fb25a6..be09ac1bfb2 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalBatchIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalBatchIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,8 +21,9 @@
import com.datastax.dse.driver.api.core.graph.SampleGraphScripts;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
@@ -29,7 +32,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8.0 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8.0 required for Core graph support")
public class CoreGraphTraversalBatchIT extends GraphTraversalBatchITBase {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalIT.java
index 8bafe312916..d97b0da958a 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/CoreGraphTraversalIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.dse.driver.api.core.graph.SocialTraversalSource;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
@@ -30,7 +33,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.8.0", description = "DSE 6.8.0 required for Core graph support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.8.0",
+ description = "DSE 6.8.0 required for Core graph support")
public class CoreGraphTraversalIT extends GraphTraversalITBase {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.CCM_BUILDER_WITH_GRAPH.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalBatchITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalBatchITBase.java
index 413df0c0436..0c8c3b8b5d4 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalBatchITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalBatchITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalITBase.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalITBase.java
index abcd38a336e..5bcb01bc165 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalITBase.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -34,7 +36,9 @@
import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.servererrors.InvalidQueryException;
import com.datastax.oss.driver.api.core.type.reflect.GenericType;
+import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
import com.datastax.oss.driver.shaded.guava.common.collect.Lists;
import java.util.List;
@@ -596,7 +600,8 @@ public void should_allow_use_of_dsl_graph_binary() throws Exception {
@Test
public void should_return_correct_results_when_bulked() {
Assumptions.assumeThat(
- ccmRule().getCcmBridge().getDseVersion().get().compareTo(Version.parse("5.1.2")) > 0)
+ CcmBridge.isDistributionOf(
+ BackendType.DSE, (dist, cass) -> dist.compareTo(Version.parse("5.1.2")) > 0))
.isTrue();
GraphResultSet rs =
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMetaPropertiesIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMetaPropertiesIT.java
index ea3ee972c24..d8058cbf59e 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMetaPropertiesIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMetaPropertiesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,8 +29,9 @@
import com.datastax.dse.driver.api.core.graph.GraphTestSupport;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
@@ -39,7 +42,10 @@
// INFO: meta props are going away in NGDG
-@DseRequirement(min = "5.0.3", description = "DSE 5.0.3 required for remote TinkerPop support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.3",
+ description = "DSE 5.0.3 required for remote TinkerPop support")
public class GraphTraversalMetaPropertiesIT {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMultiPropertiesIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMultiPropertiesIT.java
index 78bd336dc0a..c30e770f40e 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMultiPropertiesIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/graph/statement/GraphTraversalMultiPropertiesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,8 +27,9 @@
import com.datastax.dse.driver.api.core.graph.GraphTestSupport;
import com.datastax.dse.driver.api.core.graph.ScriptGraphStatement;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import java.util.Iterator;
import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -37,7 +40,10 @@
import org.junit.rules.TestRule;
// INFO: multi props are not supported in Core
-@DseRequirement(min = "5.0.3", description = "DSE 5.0.3 required for remote TinkerPop support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0.3",
+ description = "DSE 5.0.3 required for remote TinkerPop support")
public class GraphTraversalMultiPropertiesIT {
private static final CustomCcmRule CCM_RULE = GraphTestSupport.GRAPH_CCM_RULE_BUILDER.build();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/insights/InsightsClientIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/insights/InsightsClientIT.java
index 00389706fcb..0296908be44 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/insights/InsightsClientIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/insights/InsightsClientIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,8 +20,9 @@
import com.datastax.dse.driver.internal.core.insights.InsightsClient;
import com.datastax.dse.driver.internal.core.insights.configuration.InsightsConfiguration;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.internal.core.context.InternalDriverContext;
import io.netty.util.concurrent.DefaultEventExecutor;
@@ -31,7 +34,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "6.7.0", description = "DSE 6.7.0 required for Insights support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.7.0",
+ description = "DSE 6.7.0 required for Insights support")
public class InsightsClientIT {
private static final StackTraceElement[] EMPTY_STACK_TRACE = {};
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/AbstractMetadataIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/AbstractMetadataIT.java
index e77304412b8..ea28dc6449e 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/AbstractMetadataIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/AbstractMetadataIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseAggregateMetadataIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseAggregateMetadataIT.java
index a7f1a4fd25a..4c899fa5e63 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseAggregateMetadataIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseAggregateMetadataIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +24,9 @@
import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.metadata.schema.AggregateMetadata;
import com.datastax.oss.driver.api.core.type.DataTypes;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import java.util.Objects;
import java.util.Optional;
@@ -32,7 +35,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0", description = "DSE 5.0+ required function/aggregate support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0",
+ description = "DSE 5.0+ required function/aggregate support")
public class DseAggregateMetadataIT extends AbstractMetadataIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
@@ -100,9 +106,9 @@ public void should_parse_aggregate_with_deterministic() {
}
private static boolean isDse6OrHigher() {
- assumeThat(CCM_RULE.getDseVersion())
+ assumeThat(CCM_RULE.isDistributionOf(BackendType.DSE))
.describedAs("DSE required for DseFunctionMetadata tests")
- .isPresent();
- return CCM_RULE.getDseVersion().get().compareTo(DSE_6_0_0) >= 0;
+ .isTrue();
+ return CCM_RULE.getDistributionVersion().compareTo(DSE_6_0_0) >= 0;
}
}
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseFunctionMetadataIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseFunctionMetadataIT.java
index 66ed45ce9e0..53559a66b1b 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseFunctionMetadataIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/DseFunctionMetadataIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,8 +26,9 @@
import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.metadata.schema.FunctionMetadata;
import com.datastax.oss.driver.api.core.type.DataTypes;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import java.util.Objects;
import java.util.Optional;
@@ -34,7 +37,10 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@DseRequirement(min = "5.0", description = "DSE 5.0+ required function/aggregate support")
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0",
+ description = "DSE 5.0+ required function/aggregate support")
public class DseFunctionMetadataIT extends AbstractMetadataIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
@@ -227,9 +233,9 @@ public void should_parse_function_with_deterministic_and_monotonic_on() {
}
private static boolean isDse6OrHigher() {
- assumeThat(CCM_RULE.getDseVersion())
+ assumeThat(CCM_RULE.isDistributionOf(BackendType.DSE))
.describedAs("DSE required for DseFunctionMetadata tests")
- .isPresent();
- return CCM_RULE.getDseVersion().get().compareTo(DSE_6_0_0) >= 0;
+ .isTrue();
+ return CCM_RULE.getDistributionVersion().compareTo(DSE_6_0_0) >= 0;
}
}
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/KeyspaceGraphMetadataIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/KeyspaceGraphMetadataIT.java
index 6feae130b8c..dc96b265140 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/KeyspaceGraphMetadataIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/KeyspaceGraphMetadataIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.metadata.Metadata;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.CqlSessionRuleBuilder;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -32,7 +35,7 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@DseRequirement(min = "6.8")
+@BackendRequirement(type = BackendType.DSE, minInclusive = "6.8")
public class KeyspaceGraphMetadataIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataCaseSensitiveIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataCaseSensitiveIT.java
index 77bfeb13896..35242294302 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataCaseSensitiveIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataCaseSensitiveIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.oss.driver.api.core.CqlIdentifier;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.metadata.Metadata;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.CqlSessionRuleBuilder;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -38,7 +41,7 @@
* case-sensitive column names in its tables. See JAVA-2492 for more information.
*/
@Category(ParallelizableTests.class)
-@DseRequirement(min = "6.8")
+@BackendRequirement(type = BackendType.DSE, minInclusive = "6.8")
public class TableGraphMetadataCaseSensitiveIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataIT.java b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataIT.java
index 933951dd7f8..51a2204800e 100644
--- a/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataIT.java
+++ b/integration-tests/src/test/java/com/datastax/dse/driver/api/core/metadata/schema/TableGraphMetadataIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,8 +22,9 @@
import com.datastax.oss.driver.api.core.CqlIdentifier;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.metadata.Metadata;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.CqlSessionRuleBuilder;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -33,7 +36,7 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@DseRequirement(min = "6.8")
+@BackendRequirement(type = BackendType.DSE, minInclusive = "6.8")
public class TableGraphMetadataIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/CloudIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/CloudIT.java
index 7874c4719d8..f7990d707e4 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/CloudIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/CloudIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyRule.java b/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyRule.java
index 706f337d39c..fa009de78ae 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyRule.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyRule.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyServer.java b/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyServer.java
index af137f2bb70..809354a7daf 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyServer.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/api/core/cloud/SniProxyServer.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/AllNodesFailedIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/AllNodesFailedIT.java
index a4453401d93..ed453681a65 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/AllNodesFailedIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/AllNodesFailedIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectIT.java
index f7619d41791..67585bc691d 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectKeyspaceIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectKeyspaceIT.java
index 03aa2c383ab..af943b00184 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectKeyspaceIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ConnectKeyspaceIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/PeersV2NodeRefreshIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/PeersV2NodeRefreshIT.java
index 52a5b6eef53..47f3e3957af 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/PeersV2NodeRefreshIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/PeersV2NodeRefreshIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/PoolBalancingIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/PoolBalancingIT.java
index b18384ba074..c927976520b 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/PoolBalancingIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/PoolBalancingIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionInitialNegotiationIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionInitialNegotiationIT.java
index 8ba8986b35b..326c05eb15b 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionInitialNegotiationIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionInitialNegotiationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,12 +28,11 @@
import com.datastax.oss.driver.api.core.UnsupportedProtocolVersionException;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
-import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -42,68 +43,57 @@ public class ProtocolVersionInitialNegotiationIT {
@Rule public CcmRule ccm = CcmRule.getInstance();
- @CassandraRequirement(
- min = "2.1",
- max = "2.2",
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.1",
+ maxExclusive = "2.2",
description = "Only C* in [2.1,2.2[ has V3 as its highest version")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ maxExclusive = "5.0",
+ description = "Only DSE in [*,5.0[ has V3 as its highest version")
@Test
- public void should_downgrade_to_v3_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
+ public void should_downgrade_to_v3() {
try (CqlSession session = SessionUtils.newSession(ccm)) {
assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(3);
session.execute("select * from system.local");
}
}
- @DseRequirement(max = "5.0", description = "Only DSE in [*,5.0[ has V3 as its highest version")
- @Test
- public void should_downgrade_to_v3_dse() {
- try (CqlSession session = SessionUtils.newSession(ccm)) {
- assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(3);
- session.execute("select * from system.local");
- }
- }
-
- @CassandraRequirement(
- min = "2.2",
- max = "4.0-rc1",
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.2",
+ maxExclusive = "4.0-rc1",
description = "Only C* in [2.2,4.0-rc1[ has V4 as its highest version")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0",
+ maxExclusive = "5.1",
+ description = "Only DSE in [5.0,5.1[ has V4 as its highest version")
@Test
- public void should_downgrade_to_v4_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
+ public void should_downgrade_to_v4() {
try (CqlSession session = SessionUtils.newSession(ccm)) {
assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(4);
session.execute("select * from system.local");
}
}
- @CassandraRequirement(
- min = "4.0-rc1",
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "4.0-rc1",
description = "Only C* in [4.0-rc1,*[ has V5 as its highest version")
@Test
public void should_downgrade_to_v5_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
try (CqlSession session = SessionUtils.newSession(ccm)) {
assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(5);
session.execute("select * from system.local");
}
}
- @DseRequirement(
- min = "5.0",
- max = "5.1",
- description = "Only DSE in [5.0,5.1[ has V4 as its highest version")
- @Test
- public void should_downgrade_to_v4_dse() {
- try (CqlSession session = SessionUtils.newSession(ccm)) {
- assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(4);
- session.execute("select * from system.local");
- }
- }
-
- @DseRequirement(
- min = "5.1",
- max = "6.0",
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1",
+ maxExclusive = "6.0",
description = "Only DSE in [5.1,6.0[ has DSE_V1 as its highest version")
@Test
public void should_downgrade_to_dse_v1() {
@@ -113,29 +103,16 @@ public void should_downgrade_to_dse_v1() {
}
}
- @CassandraRequirement(max = "2.2", description = "Only C* in [*,2.2[ has V4 unsupported")
- @Test
- public void should_fail_if_provided_v4_is_not_supported_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
- DriverConfigLoader loader =
- SessionUtils.configLoaderBuilder()
- .withString(DefaultDriverOption.PROTOCOL_VERSION, "V4")
- .build();
- try (CqlSession ignored = SessionUtils.newSession(ccm, loader)) {
- fail("Expected an AllNodesFailedException");
- } catch (AllNodesFailedException anfe) {
- Throwable cause = anfe.getAllErrors().values().iterator().next().get(0);
- assertThat(cause).isInstanceOf(UnsupportedProtocolVersionException.class);
- UnsupportedProtocolVersionException unsupportedException =
- (UnsupportedProtocolVersionException) cause;
- assertThat(unsupportedException.getAttemptedVersions())
- .containsOnly(DefaultProtocolVersion.V4);
- }
- }
-
- @DseRequirement(max = "5.0", description = "Only DSE in [*,5.0[ has V4 unsupported")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ maxExclusive = "2.2",
+ description = "Only C* in [*,2.2[ has V4 unsupported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ maxExclusive = "5.0",
+ description = "Only DSE in [*,5.0[ has V4 unsupported")
@Test
- public void should_fail_if_provided_v4_is_not_supported_dse() {
+ public void should_fail_if_provided_v4_is_not_supported() {
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_VERSION, "V4")
@@ -152,34 +129,17 @@ public void should_fail_if_provided_v4_is_not_supported_dse() {
}
}
- @CassandraRequirement(
- min = "2.1",
- max = "4.0-rc1",
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.1",
+ maxExclusive = "4.0-rc1",
description = "Only C* in [2.1,4.0-rc1[ has V5 unsupported or supported as beta")
- @Test
- public void should_fail_if_provided_v5_is_not_supported_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
- DriverConfigLoader loader =
- SessionUtils.configLoaderBuilder()
- .withString(DefaultDriverOption.PROTOCOL_VERSION, "V5")
- .build();
- try (CqlSession ignored = SessionUtils.newSession(ccm, loader)) {
- fail("Expected an AllNodesFailedException");
- } catch (AllNodesFailedException anfe) {
- Throwable cause = anfe.getAllErrors().values().iterator().next().get(0);
- assertThat(cause).isInstanceOf(UnsupportedProtocolVersionException.class);
- UnsupportedProtocolVersionException unsupportedException =
- (UnsupportedProtocolVersionException) cause;
- assertThat(unsupportedException.getAttemptedVersions())
- .containsOnly(DefaultProtocolVersion.V5);
- }
- }
-
- @DseRequirement(
- max = "7.0",
+ @BackendRequirement(
+ type = BackendType.DSE,
+ maxExclusive = "7.0",
description = "Only DSE in [*,7.0[ has V5 unsupported or supported as beta")
@Test
- public void should_fail_if_provided_v5_is_not_supported_dse() {
+ public void should_fail_if_provided_v5_is_not_supported() {
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_VERSION, "V5")
@@ -196,7 +156,10 @@ public void should_fail_if_provided_v5_is_not_supported_dse() {
}
}
- @DseRequirement(max = "5.1", description = "Only DSE in [*,5.1[ has DSE_V1 unsupported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ maxExclusive = "5.1",
+ description = "Only DSE in [*,5.1[ has DSE_V1 unsupported")
@Test
public void should_fail_if_provided_dse_v1_is_not_supported() {
DriverConfigLoader loader =
@@ -215,7 +178,10 @@ public void should_fail_if_provided_dse_v1_is_not_supported() {
}
}
- @DseRequirement(max = "6.0", description = "Only DSE in [*,6.0[ has DSE_V2 unsupported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ maxExclusive = "6.0",
+ description = "Only DSE in [*,6.0[ has DSE_V2 unsupported")
@Test
public void should_fail_if_provided_dse_v2_is_not_supported() {
DriverConfigLoader loader =
@@ -235,10 +201,12 @@ public void should_fail_if_provided_dse_v2_is_not_supported() {
}
/** Note that this test will need to be updated as new protocol versions are introduced. */
- @CassandraRequirement(min = "4.0", description = "Only C* in [4.0,*[ has V5 supported")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "4.0",
+ description = "Only C* in [4.0,*[ has V5 supported")
@Test
- public void should_not_downgrade_if_server_supports_latest_version_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
+ public void should_not_downgrade_if_server_supports_latest_version() {
try (CqlSession session = SessionUtils.newSession(ccm)) {
assertThat(session.getContext().getProtocolVersion()).isEqualTo(ProtocolVersion.V5);
session.execute("select * from system.local");
@@ -246,7 +214,10 @@ public void should_not_downgrade_if_server_supports_latest_version_oss() {
}
/** Note that this test will need to be updated as new protocol versions are introduced. */
- @DseRequirement(min = "6.0", description = "Only DSE in [6.0,*[ has DSE_V2 supported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.0",
+ description = "Only DSE in [6.0,*[ has DSE_V2 supported")
@Test
public void should_not_downgrade_if_server_supports_latest_version_dse() {
try (CqlSession session = SessionUtils.newSession(ccm)) {
@@ -255,10 +226,16 @@ public void should_not_downgrade_if_server_supports_latest_version_dse() {
}
}
- @CassandraRequirement(min = "2.1", description = "Only C* in [2.1,*[ has V3 supported")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.1",
+ description = "Only C* in [2.1,*[ has V3 supported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "4.8",
+ description = "Only DSE in [4.8,*[ has V3 supported")
@Test
- public void should_use_explicitly_provided_v3_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
+ public void should_use_explicitly_provided_v3() {
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_VERSION, "V3")
@@ -269,36 +246,16 @@ public void should_use_explicitly_provided_v3_oss() {
}
}
- @DseRequirement(min = "4.8", description = "Only DSE in [4.8,*[ has V3 supported")
- @Test
- public void should_use_explicitly_provided_v3_dse() {
- DriverConfigLoader loader =
- SessionUtils.configLoaderBuilder()
- .withString(DefaultDriverOption.PROTOCOL_VERSION, "V3")
- .build();
- try (CqlSession session = SessionUtils.newSession(ccm, loader)) {
- assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(3);
- session.execute("select * from system.local");
- }
- }
-
- @CassandraRequirement(min = "2.2", description = "Only C* in [2.2,*[ has V4 supported")
- @Test
- public void should_use_explicitly_provided_v4_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
- DriverConfigLoader loader =
- SessionUtils.configLoaderBuilder()
- .withString(DefaultDriverOption.PROTOCOL_VERSION, "V4")
- .build();
- try (CqlSession session = SessionUtils.newSession(ccm, loader)) {
- assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(4);
- session.execute("select * from system.local");
- }
- }
-
- @DseRequirement(min = "5.0", description = "Only DSE in [5.0,*[ has V4 supported")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.2",
+ description = "Only C* in [2.2,*[ has V4 supported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.0",
+ description = "Only DSE in [5.0,*[ has V4 supported")
@Test
- public void should_use_explicitly_provided_v4_dse() {
+ public void should_use_explicitly_provided_v4() {
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_VERSION, "V4")
@@ -309,23 +266,16 @@ public void should_use_explicitly_provided_v4_dse() {
}
}
- @CassandraRequirement(min = "4.0", description = "Only C* in [4.0,*[ has V5 supported")
- @Test
- public void should_use_explicitly_provided_v5_oss() {
- Assume.assumeFalse("This test is only for OSS C*", ccm.getDseVersion().isPresent());
- DriverConfigLoader loader =
- SessionUtils.configLoaderBuilder()
- .withString(DefaultDriverOption.PROTOCOL_VERSION, "V5")
- .build();
- try (CqlSession session = SessionUtils.newSession(ccm, loader)) {
- assertThat(session.getContext().getProtocolVersion().getCode()).isEqualTo(5);
- session.execute("select * from system.local");
- }
- }
-
- @DseRequirement(min = "7.0", description = "Only DSE in [7.0,*[ has V5 supported")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "4.0",
+ description = "Only C* in [4.0,*[ has V5 supported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "7.0",
+ description = "Only DSE in [7.0,*[ has V5 supported")
@Test
- public void should_use_explicitly_provided_v5_dse() {
+ public void should_use_explicitly_provided_v5() {
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_VERSION, "V5")
@@ -336,7 +286,10 @@ public void should_use_explicitly_provided_v5_dse() {
}
}
- @DseRequirement(min = "5.1", description = "Only DSE in [5.1,*[ has DSE_V1 supported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1",
+ description = "Only DSE in [5.1,*[ has DSE_V1 supported")
@Test
public void should_use_explicitly_provided_dse_v1() {
DriverConfigLoader loader =
@@ -349,7 +302,10 @@ public void should_use_explicitly_provided_dse_v1() {
}
}
- @DseRequirement(min = "6.0", description = "Only DSE in [6.0,*[ has DSE_V2 supported")
+ @BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "6.0",
+ description = "Only DSE in [6.0,*[ has DSE_V2 supported")
@Test
public void should_use_explicitly_provided_dse_v2() {
DriverConfigLoader loader =
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionMixedClusterIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionMixedClusterIT.java
index 3bd25b8c61d..fae7477063c 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionMixedClusterIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ProtocolVersionMixedClusterIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/SerializationIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/SerializationIT.java
index f9bdff1b656..b33e5421838 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/SerializationIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/SerializationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/SessionLeakIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/SessionLeakIT.java
index fe70cebbc96..c0cf0b78e7f 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/SessionLeakIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/SessionLeakIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/auth/PlainTextAuthProviderIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/auth/PlainTextAuthProviderIT.java
index 4ff36a44755..86dd6cda2fd 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/auth/PlainTextAuthProviderIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/auth/PlainTextAuthProviderIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/DirectCompressionIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/DirectCompressionIT.java
index 4f4ff89db47..3dad08f4de6 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/DirectCompressionIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/DirectCompressionIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,6 +29,7 @@
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -73,8 +76,9 @@ public static void setup() {
public void should_execute_queries_with_snappy_compression() throws Exception {
Assume.assumeTrue(
"Snappy is not supported in OSS C* 4.0+ with protocol v5",
- CCM_RULE.getDseVersion().isPresent()
- || CCM_RULE.getCassandraVersion().nextStable().compareTo(Version.V4_0_0) < 0);
+ !CCM_RULE.isDistributionOf(BackendType.HCD)
+ && (CCM_RULE.isDistributionOf(BackendType.DSE)
+ || CCM_RULE.getCassandraVersion().nextStable().compareTo(Version.V4_0_0) < 0));
createAndCheckCluster("snappy");
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/HeapCompressionIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/HeapCompressionIT.java
index 85692edc481..a14c3b29b21 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/HeapCompressionIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/compression/HeapCompressionIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,6 +29,7 @@
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.IsolatedTests;
@@ -77,7 +80,7 @@ public static void setup() {
public void should_execute_queries_with_snappy_compression() throws Exception {
Assume.assumeTrue(
"Snappy is not supported in OSS C* 4.0+ with protocol v5",
- CCM_RULE.getDseVersion().isPresent()
+ CCM_RULE.isDistributionOf(BackendType.DSE)
|| CCM_RULE.getCassandraVersion().nextStable().compareTo(Version.V4_0_0) < 0);
createAndCheckCluster("snappy");
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverConfigValidationIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverConfigValidationIT.java
index fcafd262a91..e5056e05495 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverConfigValidationIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverConfigValidationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileCcmIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileCcmIT.java
index 391ef7b5c39..1eee9c304b6 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileCcmIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileCcmIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileReloadIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileReloadIT.java
index 43105a0d6e2..02bea70405e 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileReloadIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileReloadIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileSimulacronIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileSimulacronIT.java
index 8fe6d9fd573..f5131a2bfa3 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileSimulacronIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileSimulacronIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/MapBasedConfigLoaderIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/MapBasedConfigLoaderIT.java
index 859d6c567ad..b8a6accce69 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/config/MapBasedConfigLoaderIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/config/MapBasedConfigLoaderIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/ChannelSocketOptionsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/ChannelSocketOptionsIT.java
index 5384a5b2ff3..177a0cd0a24 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/ChannelSocketOptionsIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/ChannelSocketOptionsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/FrameLengthIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/FrameLengthIT.java
index 3c42bd8f630..887a578f7c4 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/FrameLengthIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/FrameLengthIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/NettyResourceLeakDetectionIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/NettyResourceLeakDetectionIT.java
index ada5ae9a61b..c605db151df 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/NettyResourceLeakDetectionIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/connection/NettyResourceLeakDetectionIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,13 +26,15 @@
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import com.datastax.oss.driver.api.core.CqlSession;
-import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
import com.datastax.oss.driver.api.core.config.DriverExecutionProfile;
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirementRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.IsolatedTests;
@@ -42,10 +46,10 @@
import java.nio.ByteBuffer;
import java.util.List;
import org.junit.After;
-import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.RuleChain;
@@ -70,6 +74,10 @@ public class NettyResourceLeakDetectionIT {
@ClassRule
public static final TestRule CHAIN = RuleChain.outerRule(CCM_RULE).around(SESSION_RULE);
+ // Separately use BackendRequirementRule with @Rule so backend requirements are evaluated for each
+ // test method.
+ @Rule public final BackendRequirementRule backendRequirementRule = new BackendRequirementRule();
+
private static final ByteBuffer LARGE_PAYLOAD =
Bytes.fromHexString("0x" + Strings.repeat("ab", Segment.MAX_PAYLOAD_LENGTH + 100));
@@ -118,12 +126,15 @@ public void should_not_leak_compressed_lz4() {
}
}
+ @BackendRequirement(
+ type = BackendType.DSE,
+ description = "Snappy is not supported in OSS C* 4.0+ with protocol v5")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ maxExclusive = "4.0.0",
+ description = "Snappy is not supported in OSS C* 4.0+ with protocol v5")
@Test
public void should_not_leak_compressed_snappy() {
- Assume.assumeTrue(
- "Snappy is not supported in OSS C* 4.0+ with protocol v5",
- CCM_RULE.getDseVersion().isPresent()
- || CCM_RULE.getCassandraVersion().nextStable().compareTo(Version.V4_0_0) < 0);
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_COMPRESSION, "snappy")
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/context/LifecycleListenerIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/context/LifecycleListenerIT.java
index be2ed684df6..3bd4add3003 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/context/LifecycleListenerIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/context/LifecycleListenerIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/AsyncResultSetIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/AsyncResultSetIT.java
index 934bd6be6b1..e109c28525e 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/AsyncResultSetIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/AsyncResultSetIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,6 +29,7 @@
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -65,13 +68,16 @@ public class AsyncResultSetIT {
@BeforeClass
public static void setupSchema() {
// create table and load data across two partitions so we can test paging across tokens.
- SESSION_RULE
- .session()
- .execute(
- SimpleStatement.builder(
- "CREATE TABLE IF NOT EXISTS test (k0 text, k1 int, v int, PRIMARY KEY(k0, k1))")
- .setExecutionProfile(SESSION_RULE.slowProfile())
- .build());
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ SESSION_RULE
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test (k0 text, k1 int, v int, PRIMARY KEY(k0, k1))")
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ });
PreparedStatement prepared =
SESSION_RULE.session().prepare("INSERT INTO test (k0, k1, v) VALUES (?, ?, ?)");
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BatchStatementIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BatchStatementIT.java
index 358ed2b0f02..8b652638729 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BatchStatementIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BatchStatementIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,6 +18,7 @@
package com.datastax.oss.driver.core.cql;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
@@ -30,8 +33,10 @@
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.cql.Statement;
import com.datastax.oss.driver.api.core.servererrors.InvalidQueryException;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -68,13 +73,16 @@ public void createTable() {
"CREATE TABLE counter3 (k0 text PRIMARY KEY, c counter)",
};
- for (String schemaStatement : schemaStatements) {
- sessionRule
- .session()
- .execute(
- SimpleStatement.newInstance(schemaStatement)
- .setExecutionProfile(sessionRule.slowProfile()));
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ for (String schemaStatement : schemaStatements) {
+ sessionRule
+ .session()
+ .execute(
+ SimpleStatement.newInstance(schemaStatement)
+ .setExecutionProfile(sessionRule.slowProfile()));
+ }
+ });
}
@Test
@@ -120,7 +128,7 @@ public void should_execute_batch_of_bound_statements_with_variables() {
}
@Test
- @CassandraRequirement(min = "2.2")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public void should_execute_batch_of_bound_statements_with_unset_values() {
// Build a batch of batchCount statements with bound statements, each with their own positional
// variables.
@@ -338,16 +346,20 @@ public void should_fail_counter_batch_with_non_counter_increment() {
sessionRule.session().execute(batchStatement);
}
- @Test(expected = IllegalStateException.class)
+ @Test
public void should_not_allow_unset_value_when_protocol_less_than_v4() {
// CREATE TABLE test (k0 text, k1 int, v int, PRIMARY KEY (k0, k1))
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_VERSION, "V3")
.build();
- try (CqlSession v3Session = SessionUtils.newSession(ccmRule, sessionRule.keyspace(), loader)) {
+ try (CqlSession v3Session = SessionUtils.newSession(ccmRule, loader)) {
+ // Intentionally use fully qualified table here to avoid warnings as these are not supported
+ // by v3 protocol version, see JAVA-3068
PreparedStatement prepared =
- v3Session.prepare("INSERT INTO test (k0, k1, v) values (?, ?, ?)");
+ v3Session.prepare(
+ String.format(
+ "INSERT INTO %s.test (k0, k1, v) values (?, ?, ?)", sessionRule.keyspace()));
BatchStatementBuilder builder = BatchStatement.builder(DefaultBatchType.LOGGED);
builder.addStatements(
@@ -361,7 +373,9 @@ public void should_not_allow_unset_value_when_protocol_less_than_v4() {
.unset(2)
.build());
- v3Session.execute(builder.build());
+ assertThatThrownBy(() -> v3Session.execute(builder.build()))
+ .isInstanceOf(IllegalStateException.class)
+ .hasMessageContaining("Unset value at index");
}
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementCcmIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementCcmIT.java
index 75748d37a6c..9e4b62cd230 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementCcmIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementCcmIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,6 +18,7 @@
package com.datastax.oss.driver.core.cql;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assumptions.assumeThat;
import com.datastax.oss.driver.api.core.ConsistencyLevel;
@@ -36,8 +39,10 @@
import com.datastax.oss.driver.api.core.cql.Statement;
import com.datastax.oss.driver.api.core.metadata.token.Token;
import com.datastax.oss.driver.api.core.type.codec.TypeCodecs;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -90,55 +95,65 @@ public class BoundStatementCcmIT {
@Before
public void setupSchema() {
// table where every column forms the primary key.
- sessionRule
- .session()
- .execute(
- SimpleStatement.builder(
- "CREATE TABLE IF NOT EXISTS test (k text, v int, PRIMARY KEY(k, v))")
- .setExecutionProfile(sessionRule.slowProfile())
- .build());
- for (int i = 0; i < 100; i++) {
- sessionRule
- .session()
- .execute(
- SimpleStatement.builder("INSERT INTO test (k, v) VALUES (?, ?)")
- .addPositionalValues(KEY, i)
- .build());
- }
-
- // table with simple primary key, single cell.
- sessionRule
- .session()
- .execute(
- SimpleStatement.builder("CREATE TABLE IF NOT EXISTS test2 (k text primary key, v0 int)")
- .setExecutionProfile(sessionRule.slowProfile())
- .build());
-
- // table with composite partition key
- sessionRule
- .session()
- .execute(
- SimpleStatement.builder(
- "CREATE TABLE IF NOT EXISTS test3 "
- + "(pk1 int, pk2 int, v int, "
- + "PRIMARY KEY ((pk1, pk2)))")
- .setExecutionProfile(sessionRule.slowProfile())
- .build());
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ sessionRule
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test (k text, v int, PRIMARY KEY(k, v))")
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+ for (int i = 0; i < 100; i++) {
+ sessionRule
+ .session()
+ .execute(
+ SimpleStatement.builder("INSERT INTO test (k, v) VALUES (?, ?)")
+ .addPositionalValues(KEY, i)
+ .build());
+ }
+
+ // table with simple primary key, single cell.
+ sessionRule
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test2 (k text primary key, v0 int)")
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+
+ // table with composite partition key
+ sessionRule
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test3 "
+ + "(pk1 int, pk2 int, v int, "
+ + "PRIMARY KEY ((pk1, pk2)))")
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+ });
}
- @Test(expected = IllegalStateException.class)
+ @Test
public void should_not_allow_unset_value_when_protocol_less_than_v4() {
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
.withString(DefaultDriverOption.PROTOCOL_VERSION, "V3")
.build();
- try (CqlSession v3Session = SessionUtils.newSession(ccmRule, sessionRule.keyspace(), loader)) {
- PreparedStatement prepared = v3Session.prepare("INSERT INTO test2 (k, v0) values (?, ?)");
+ try (CqlSession v3Session = SessionUtils.newSession(ccmRule, loader)) {
+ // Intentionally use fully qualified table here to avoid warnings as these are not supported
+ // by v3 protocol version, see JAVA-3068
+ PreparedStatement prepared =
+ v3Session.prepare(
+ String.format("INSERT INTO %s.test2 (k, v0) values (?, ?)", sessionRule.keyspace()));
BoundStatement boundStatement =
prepared.boundStatementBuilder().setString(0, name.getMethodName()).unset(1).build();
- v3Session.execute(boundStatement);
+ assertThatThrownBy(() -> v3Session.execute(boundStatement))
+ .isInstanceOf(IllegalStateException.class)
+ .hasMessageContaining("Unset value at index");
}
}
@@ -346,7 +361,7 @@ public void should_propagate_attributes_when_preparing_a_simple_statement() {
// Test for JAVA-2066
@Test
- @CassandraRequirement(min = "2.2")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public void should_compute_routing_key_when_indices_randomly_distributed() {
try (CqlSession session = SessionUtils.newSession(ccmRule, sessionRule.keyspace())) {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementSimulacronIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementSimulacronIT.java
index 71fc5eb429e..cb81874d47a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementSimulacronIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/BoundStatementSimulacronIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/ExecutionInfoWarningsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/ExecutionInfoWarningsIT.java
index e3648c93424..edee9723a38 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/ExecutionInfoWarningsIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/ExecutionInfoWarningsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,8 +32,10 @@
import com.datastax.oss.driver.api.core.cql.ResultSet;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.cql.Statement;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.cql.CqlRequestHandler;
@@ -85,12 +89,16 @@ public class ExecutionInfoWarningsIT {
@Before
public void createSchema() {
// table with simple primary key, single cell.
- sessionRule
- .session()
- .execute(
- SimpleStatement.builder("CREATE TABLE IF NOT EXISTS test (k int primary key, v text)")
- .setExecutionProfile(sessionRule.slowProfile())
- .build());
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ sessionRule
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test (k int primary key, v text)")
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+ });
for (int i = 0; i < 100; i++) {
sessionRule
.session()
@@ -116,7 +124,7 @@ public void cleanupLogger() {
}
@Test
- @CassandraRequirement(min = "3.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "3.0")
public void should_execute_query_and_log_server_side_warnings() {
final String query = "SELECT count(*) FROM test;";
Statement> st = SimpleStatement.builder(query).build();
@@ -140,7 +148,7 @@ public void should_execute_query_and_log_server_side_warnings() {
}
@Test
- @CassandraRequirement(min = "3.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "3.0")
public void should_execute_query_and_not_log_server_side_warnings() {
final String query = "SELECT count(*) FROM test;";
Statement> st =
@@ -158,7 +166,7 @@ public void should_execute_query_and_not_log_server_side_warnings() {
}
@Test
- @CassandraRequirement(min = "2.2")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public void should_expose_warnings_on_execution_info() {
// the default batch size warn threshold is 5 * 1024 bytes, but after CASSANDRA-10876 there must
// be multiple mutations in a batch to trigger this warning so the batch includes 2 different
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/NowInSecondsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/NowInSecondsIT.java
index 2b570329d51..191dc040ffd 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/NowInSecondsIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/NowInSecondsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,9 +26,9 @@
import com.datastax.oss.driver.api.core.cql.ResultSet;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.cql.Statement;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
@@ -39,10 +41,11 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "4.0")
-@DseRequirement(
- // Use next version -- not sure if it will be in by then, but as a reminder to check
- min = "7.0",
+@BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
+// Use next version -- not sure if it will be in by then, but as a reminder to check
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "7.0",
description = "Feature not available in DSE yet")
public class NowInSecondsIT {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingIterableSpliteratorIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingIterableSpliteratorIT.java
index 0ea751ee41a..02078b683db 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingIterableSpliteratorIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingIterableSpliteratorIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingStateIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingStateIT.java
index 689c2390db7..6d33f35238a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingStateIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PagingStateIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,6 +30,7 @@
import com.datastax.oss.driver.api.core.type.codec.MappingCodec;
import com.datastax.oss.driver.api.core.type.reflect.GenericType;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -53,11 +56,14 @@ public class PagingStateIT {
@Before
public void setupSchema() {
CqlSession session = SESSION_RULE.session();
- session.execute(
- SimpleStatement.builder(
- "CREATE TABLE IF NOT EXISTS foo (k int, cc int, v int, PRIMARY KEY(k, cc))")
- .setExecutionProfile(SESSION_RULE.slowProfile())
- .build());
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ session.execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS foo (k int, cc int, v int, PRIMARY KEY(k, cc))")
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ });
for (int i = 0; i < 20; i++) {
session.execute(
SimpleStatement.newInstance("INSERT INTO foo (k, cc, v) VALUES (1, ?, ?)", i, i));
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PerRequestKeyspaceIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PerRequestKeyspaceIT.java
index de6be0afe61..9eb883144db 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PerRequestKeyspaceIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PerRequestKeyspaceIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,8 +30,10 @@
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.cql.Statement;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -64,24 +68,27 @@ public class PerRequestKeyspaceIT {
@Before
public void setupSchema() {
- sessionRule
- .session()
- .execute(
- SimpleStatement.builder(
- "CREATE TABLE IF NOT EXISTS foo (k text, cc int, v int, PRIMARY KEY(k, cc))")
- .setExecutionProfile(sessionRule.slowProfile())
- .build());
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ sessionRule
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS foo (k text, cc int, v int, PRIMARY KEY(k, cc))")
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+ });
}
@Test
- @CassandraRequirement(min = "2.2")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public void should_reject_simple_statement_with_keyspace_in_protocol_v4() {
should_reject_statement_with_keyspace_in_protocol_v4(
SimpleStatement.newInstance("SELECT * FROM foo").setKeyspace(sessionRule.keyspace()));
}
@Test
- @CassandraRequirement(min = "2.2")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public void should_reject_batch_statement_with_explicit_keyspace_in_protocol_v4() {
SimpleStatement statementWithoutKeyspace =
SimpleStatement.newInstance(
@@ -94,7 +101,7 @@ public void should_reject_batch_statement_with_explicit_keyspace_in_protocol_v4(
}
@Test
- @CassandraRequirement(min = "2.2")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public void should_reject_batch_statement_with_inferred_keyspace_in_protocol_v4() {
SimpleStatement statementWithKeyspace =
SimpleStatement.newInstance(
@@ -120,7 +127,7 @@ private void should_reject_statement_with_keyspace_in_protocol_v4(Statement stat
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_execute_simple_statement_with_keyspace() {
CqlSession session = sessionRule.session();
session.execute(
@@ -138,7 +145,7 @@ public void should_execute_simple_statement_with_keyspace() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_execute_batch_with_explicit_keyspace() {
CqlSession session = sessionRule.session();
session.execute(
@@ -162,7 +169,7 @@ public void should_execute_batch_with_explicit_keyspace() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_execute_batch_with_inferred_keyspace() {
CqlSession session = sessionRule.session();
session.execute(
@@ -194,7 +201,7 @@ public void should_execute_batch_with_inferred_keyspace() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_prepare_statement_with_keyspace() {
CqlSession session = sessionRule.session();
PreparedStatement prepared =
@@ -214,30 +221,34 @@ public void should_prepare_statement_with_keyspace() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_reprepare_statement_with_keyspace_on_the_fly() {
// Create a separate session because we don't want it to have a default keyspace
- try (CqlSession session = SessionUtils.newSession(ccmRule)) {
- executeDdl(
- session,
- String.format(
- "CREATE TABLE IF NOT EXISTS %s.bar (k int primary key)", sessionRule.keyspace()));
- PreparedStatement pst =
- session.prepare(
- SimpleStatement.newInstance("SELECT * FROM bar WHERE k=?")
- .setKeyspace(sessionRule.keyspace()));
-
- // Drop and re-create the table to invalidate the prepared statement server side
- executeDdl(session, String.format("DROP TABLE %s.bar", sessionRule.keyspace()));
- executeDdl(
- session,
- String.format("CREATE TABLE %s.bar (k int primary key)", sessionRule.keyspace()));
- assertThat(preparedStatementExistsOnServer(session, pst.getId())).isFalse();
-
- // This will re-prepare on the fly
- session.execute(pst.bind(0));
- assertThat(preparedStatementExistsOnServer(session, pst.getId())).isTrue();
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ try (CqlSession session = SessionUtils.newSession(ccmRule)) {
+ executeDdl(
+ session,
+ String.format(
+ "CREATE TABLE IF NOT EXISTS %s.bar (k int primary key)",
+ sessionRule.keyspace()));
+ PreparedStatement pst =
+ session.prepare(
+ SimpleStatement.newInstance("SELECT * FROM bar WHERE k=?")
+ .setKeyspace(sessionRule.keyspace()));
+
+ // Drop and re-create the table to invalidate the prepared statement server side
+ executeDdl(session, String.format("DROP TABLE %s.bar", sessionRule.keyspace()));
+ executeDdl(
+ session,
+ String.format("CREATE TABLE %s.bar (k int primary key)", sessionRule.keyspace()));
+ assertThat(preparedStatementExistsOnServer(session, pst.getId())).isFalse();
+
+ // This will re-prepare on the fly
+ session.execute(pst.bind(0));
+ assertThat(preparedStatementExistsOnServer(session, pst.getId())).isTrue();
+ }
+ });
}
private void executeDdl(CqlSession session, String query) {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java
new file mode 100644
index 00000000000..617d489fb95
--- /dev/null
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java
@@ -0,0 +1,429 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.core.cql;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.codahale.metrics.Gauge;
+import com.datastax.oss.driver.api.core.CqlSession;
+import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
+import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
+import com.datastax.oss.driver.api.core.context.DriverContext;
+import com.datastax.oss.driver.api.core.cql.PreparedStatement;
+import com.datastax.oss.driver.api.core.metrics.DefaultSessionMetric;
+import com.datastax.oss.driver.api.core.session.ProgrammaticArguments;
+import com.datastax.oss.driver.api.core.session.SessionBuilder;
+import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.session.SessionRule;
+import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
+import com.datastax.oss.driver.categories.IsolatedTests;
+import com.datastax.oss.driver.internal.core.context.DefaultDriverContext;
+import com.datastax.oss.driver.internal.core.cql.CqlPrepareAsyncProcessor;
+import com.datastax.oss.driver.internal.core.cql.CqlPrepareSyncProcessor;
+import com.datastax.oss.driver.internal.core.metadata.schema.events.TypeChangeEvent;
+import com.datastax.oss.driver.internal.core.session.BuiltInRequestProcessors;
+import com.datastax.oss.driver.internal.core.session.RequestProcessor;
+import com.datastax.oss.driver.internal.core.session.RequestProcessorRegistry;
+import com.datastax.oss.driver.shaded.guava.common.cache.RemovalListener;
+import com.datastax.oss.driver.shaded.guava.common.util.concurrent.Uninterruptibles;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import java.nio.ByteBuffer;
+import java.time.Duration;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+// These tests must be isolated because setup modifies SessionUtils.SESSION_BUILDER_CLASS_PROPERTY
+@Category(IsolatedTests.class)
+public class PreparedStatementCachingIT {
+
+ private CustomCcmRule ccmRule = CustomCcmRule.builder().build();
+
+ private SessionRule sessionRule =
+ SessionRule.builder(ccmRule)
+ .withConfigLoader(
+ SessionUtils.configLoaderBuilder()
+ .withInt(DefaultDriverOption.REQUEST_PAGE_SIZE, 2)
+ .withDuration(DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofSeconds(30))
+ .build())
+ .build();
+
+ @Rule public TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
+
+ private static class PreparedStatementRemovalEvent {
+
+ private final ByteBuffer queryId;
+
+ public PreparedStatementRemovalEvent(ByteBuffer queryId) {
+ this.queryId = queryId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || !(o instanceof PreparedStatementRemovalEvent)) return false;
+ PreparedStatementRemovalEvent that = (PreparedStatementRemovalEvent) o;
+ return Objects.equals(queryId, that.queryId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(queryId);
+ }
+
+ @Override
+ public String toString() {
+ return "PreparedStatementRemovalEvent{" + "queryId=" + queryId + '}';
+ }
+ }
+
+ private static class TestCqlPrepareAsyncProcessor extends CqlPrepareAsyncProcessor {
+
+ private static final Logger LOG =
+ LoggerFactory.getLogger(PreparedStatementCachingIT.TestCqlPrepareAsyncProcessor.class);
+
+ private static RemovalListener buildCacheRemoveCallback(
+ @NonNull Optional context) {
+ return (evt) -> {
+ try {
+ CompletableFuture future =
+ (CompletableFuture) evt.getValue();
+ ByteBuffer queryId = Uninterruptibles.getUninterruptibly(future).getId();
+ context.ifPresent(
+ ctx -> ctx.getEventBus().fire(new PreparedStatementRemovalEvent(queryId)));
+ } catch (Exception e) {
+ LOG.error("Unable to register removal handler", e);
+ }
+ };
+ }
+
+ public TestCqlPrepareAsyncProcessor(@NonNull Optional context) {
+ // Default CqlPrepareAsyncProcessor uses weak values here as well. We avoid doing so
+ // to prevent cache entries from unexpectedly disappearing mid-test.
+ super(context, builder -> builder.removalListener(buildCacheRemoveCallback(context)));
+ }
+ }
+
+ private static class TestDefaultDriverContext extends DefaultDriverContext {
+ public TestDefaultDriverContext(
+ DriverConfigLoader configLoader, ProgrammaticArguments programmaticArguments) {
+ super(configLoader, programmaticArguments);
+ }
+
+ @Override
+ protected RequestProcessorRegistry buildRequestProcessorRegistry() {
+ // Re-create the processor cache to insert the TestCqlPrepareAsyncProcessor with it's strong
+ // prepared statement cache, see JAVA-3062
+ List> processors =
+ BuiltInRequestProcessors.createDefaultProcessors(this);
+ processors.removeIf((processor) -> processor instanceof CqlPrepareAsyncProcessor);
+ processors.removeIf((processor) -> processor instanceof CqlPrepareSyncProcessor);
+ CqlPrepareAsyncProcessor asyncProcessor = new TestCqlPrepareAsyncProcessor(Optional.of(this));
+ processors.add(2, asyncProcessor);
+ processors.add(3, new CqlPrepareSyncProcessor(asyncProcessor));
+ return new RequestProcessorRegistry(
+ getSessionName(), processors.toArray(new RequestProcessor[0]));
+ }
+ }
+
+ private static class TestSessionBuilder extends SessionBuilder {
+
+ @Override
+ protected Object wrap(@NonNull CqlSession defaultSession) {
+ return defaultSession;
+ }
+
+ @Override
+ protected DriverContext buildContext(
+ DriverConfigLoader configLoader, ProgrammaticArguments programmaticArguments) {
+ return new TestDefaultDriverContext(configLoader, programmaticArguments);
+ }
+ }
+
+ @BeforeClass
+ public static void setup() {
+ System.setProperty(
+ SessionUtils.SESSION_BUILDER_CLASS_PROPERTY, PreparedStatementCachingIT.class.getName());
+ }
+
+ @AfterClass
+ public static void teardown() {
+ System.clearProperty(SessionUtils.SESSION_BUILDER_CLASS_PROPERTY);
+ }
+
+ public static SessionBuilder builder() {
+ return new TestSessionBuilder();
+ }
+
+ private void invalidationResultSetTest(
+ Consumer setupTestSchema, Set expectedChangedTypes) {
+ invalidationTestInner(
+ setupTestSchema,
+ "select f from test_table_1 where e = ?",
+ "select h from test_table_2 where g = ?",
+ expectedChangedTypes);
+ }
+
+ private void invalidationVariableDefsTest(
+ Consumer setupTestSchema,
+ boolean isCollection,
+ Set expectedChangedTypes) {
+ String condition = isCollection ? "contains ?" : "= ?";
+ invalidationTestInner(
+ setupTestSchema,
+ String.format("select e from test_table_1 where f %s allow filtering", condition),
+ String.format("select g from test_table_2 where h %s allow filtering", condition),
+ expectedChangedTypes);
+ }
+
+ private void invalidationTestInner(
+ Consumer setupTestSchema,
+ String preparedStmtQueryType1,
+ String preparedStmtQueryType2,
+ Set expectedChangedTypes) {
+
+ try (CqlSession session = sessionWithCacheSizeMetric()) {
+
+ assertThat(getPreparedCacheSize(session)).isEqualTo(0);
+ setupTestSchema.accept(session);
+
+ session.prepare(preparedStmtQueryType1);
+ ByteBuffer queryId2 = session.prepare(preparedStmtQueryType2).getId();
+ assertThat(getPreparedCacheSize(session)).isEqualTo(2);
+
+ CountDownLatch preparedStmtCacheRemoveLatch = new CountDownLatch(1);
+ CountDownLatch typeChangeEventLatch = new CountDownLatch(expectedChangedTypes.size());
+
+ DefaultDriverContext ctx = (DefaultDriverContext) session.getContext();
+ Map changedTypes = new ConcurrentHashMap<>();
+ AtomicReference> removedQueryIds =
+ new AtomicReference<>(Optional.empty());
+ AtomicReference> typeChangeEventError =
+ new AtomicReference<>(Optional.empty());
+ AtomicReference> removedQueryEventError =
+ new AtomicReference<>(Optional.empty());
+ ctx.getEventBus()
+ .register(
+ TypeChangeEvent.class,
+ (e) -> {
+ // expect one event per type changed and for every parent type that nests it
+ if (Boolean.TRUE.equals(
+ changedTypes.putIfAbsent(e.oldType.getName().toString(), true))) {
+ // store an error if we see duplicate change event
+ // any non-empty error will fail the test so it's OK to do this multiple times
+ typeChangeEventError.set(Optional.of("Duplicate type change event " + e));
+ }
+ typeChangeEventLatch.countDown();
+ });
+ ctx.getEventBus()
+ .register(
+ PreparedStatementRemovalEvent.class,
+ (e) -> {
+ if (!removedQueryIds.compareAndSet(Optional.empty(), Optional.of(e.queryId))) {
+ // store an error if we see multiple cache invalidation events
+ // any non-empty error will fail the test so it's OK to do this multiple times
+ removedQueryEventError.set(
+ Optional.of("Unable to set reference for PS removal event"));
+ }
+ preparedStmtCacheRemoveLatch.countDown();
+ });
+
+ // alter test_type_2 to trigger cache invalidation and above events
+ session.execute("ALTER TYPE test_type_2 add i blob");
+
+ // wait for latches and fail if they don't reach zero before timeout
+ assertThat(
+ Uninterruptibles.awaitUninterruptibly(
+ preparedStmtCacheRemoveLatch, 10, TimeUnit.SECONDS))
+ .withFailMessage("preparedStmtCacheRemoveLatch did not trigger before timeout")
+ .isTrue();
+ assertThat(Uninterruptibles.awaitUninterruptibly(typeChangeEventLatch, 10, TimeUnit.SECONDS))
+ .withFailMessage("typeChangeEventLatch did not trigger before timeout")
+ .isTrue();
+
+ /* Okay, the latch triggered so cache processing should now be done. Let's validate :allthethings: */
+ assertThat(changedTypes.keySet()).isEqualTo(expectedChangedTypes);
+ assertThat(removedQueryIds.get()).isNotEmpty().get().isEqualTo(queryId2);
+ assertThat(getPreparedCacheSize(session)).isEqualTo(1);
+
+ // check no errors were seen in callback (and report those as fail msgs)
+ // if something is broken these may still succeed due to timing
+ // but shouldn't intermittently fail if the code is working properly
+ assertThat(typeChangeEventError.get())
+ .withFailMessage(() -> typeChangeEventError.get().get())
+ .isEmpty();
+ assertThat(removedQueryEventError.get())
+ .withFailMessage(() -> removedQueryEventError.get().get())
+ .isEmpty();
+ }
+ }
+
+ Consumer setupCacheEntryTestBasic =
+ (session) -> {
+ session.execute("CREATE TYPE test_type_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_2 (c int, d text)");
+ session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen)");
+ session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen)");
+ };
+
+ @Test
+ public void should_invalidate_cache_entry_on_basic_udt_change_result_set() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationResultSetTest(setupCacheEntryTestBasic, ImmutableSet.of("test_type_2"));
+ });
+ }
+
+ @Test
+ public void should_invalidate_cache_entry_on_basic_udt_change_variable_defs() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationVariableDefsTest(
+ setupCacheEntryTestBasic, false, ImmutableSet.of("test_type_2"));
+ });
+ }
+
+ Consumer setupCacheEntryTestCollection =
+ (session) -> {
+ session.execute("CREATE TYPE test_type_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_1 (e int primary key, f list>)");
+ session.execute(
+ "CREATE TABLE test_table_2 (g int primary key, h list>)");
+ };
+
+ @Test
+ public void should_invalidate_cache_entry_on_collection_udt_change_result_set() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationResultSetTest(setupCacheEntryTestCollection, ImmutableSet.of("test_type_2"));
+ });
+ }
+
+ @Test
+ public void should_invalidate_cache_entry_on_collection_udt_change_variable_defs() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationVariableDefsTest(
+ setupCacheEntryTestCollection, true, ImmutableSet.of("test_type_2"));
+ });
+ }
+
+ Consumer setupCacheEntryTestTuple =
+ (session) -> {
+ session.execute("CREATE TYPE test_type_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_1 (e int primary key, f tuple)");
+ session.execute(
+ "CREATE TABLE test_table_2 (g int primary key, h tuple)");
+ };
+
+ @Test
+ public void should_invalidate_cache_entry_on_tuple_udt_change_result_set() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationResultSetTest(setupCacheEntryTestTuple, ImmutableSet.of("test_type_2"));
+ });
+ }
+
+ @Test
+ public void should_invalidate_cache_entry_on_tuple_udt_change_variable_defs() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationVariableDefsTest(
+ setupCacheEntryTestTuple, false, ImmutableSet.of("test_type_2"));
+ });
+ }
+
+ Consumer setupCacheEntryTestNested =
+ (session) -> {
+ session.execute("CREATE TYPE test_type_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_2 (c int, d text)");
+ session.execute("CREATE TYPE test_type_3 (e frozen, f int)");
+ session.execute("CREATE TYPE test_type_4 (g int, h frozen)");
+ session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen)");
+ session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen)");
+ };
+
+ @Test
+ public void should_invalidate_cache_entry_on_nested_udt_change_result_set() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationResultSetTest(
+ setupCacheEntryTestNested, ImmutableSet.of("test_type_2", "test_type_4"));
+ });
+ }
+
+ @Test
+ public void should_invalidate_cache_entry_on_nested_udt_change_variable_defs() {
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ invalidationVariableDefsTest(
+ setupCacheEntryTestNested, false, ImmutableSet.of("test_type_2", "test_type_4"));
+ });
+ }
+
+ /* ========================= Infrastructure copied from PreparedStatementIT ========================= */
+ private CqlSession sessionWithCacheSizeMetric() {
+ return SessionUtils.newSession(
+ ccmRule,
+ sessionRule.keyspace(),
+ SessionUtils.configLoaderBuilder()
+ .withInt(DefaultDriverOption.REQUEST_PAGE_SIZE, 2)
+ .withDuration(DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofSeconds(30))
+ .withStringList(
+ DefaultDriverOption.METRICS_SESSION_ENABLED,
+ ImmutableList.of(DefaultSessionMetric.CQL_PREPARED_CACHE_SIZE.getPath()))
+ .build());
+ }
+
+ @SuppressWarnings("unchecked")
+ private static long getPreparedCacheSize(CqlSession session) {
+ return session
+ .getMetrics()
+ .flatMap(metrics -> metrics.getSessionMetric(DefaultSessionMetric.CQL_PREPARED_CACHE_SIZE))
+ .map(metric -> ((Gauge) metric).getValue())
+ .orElseThrow(
+ () ->
+ new AssertionError(
+ "Could not access metric "
+ + DefaultSessionMetric.CQL_PREPARED_CACHE_SIZE.getPath()));
+ }
+}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCancellationIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCancellationIT.java
new file mode 100644
index 00000000000..d7e581e4606
--- /dev/null
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCancellationIT.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.core.cql;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
+
+import com.datastax.oss.driver.api.core.CqlSession;
+import com.datastax.oss.driver.api.core.cql.PrepareRequest;
+import com.datastax.oss.driver.api.core.cql.PreparedStatement;
+import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.session.SessionRule;
+import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
+import com.datastax.oss.driver.categories.IsolatedTests;
+import com.datastax.oss.driver.internal.core.context.DefaultDriverContext;
+import com.datastax.oss.driver.internal.core.cql.CqlPrepareAsyncProcessor;
+import com.datastax.oss.driver.shaded.guava.common.base.Predicates;
+import com.datastax.oss.driver.shaded.guava.common.cache.Cache;
+import com.datastax.oss.driver.shaded.guava.common.collect.Iterables;
+import java.util.concurrent.CompletableFuture;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
+
+@Category(IsolatedTests.class)
+public class PreparedStatementCancellationIT {
+
+ private CustomCcmRule ccmRule = CustomCcmRule.builder().build();
+
+ private SessionRule sessionRule = SessionRule.builder(ccmRule).build();
+
+ @Rule public TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
+
+ @Before
+ public void setup() {
+
+ CqlSession session = SessionUtils.newSession(ccmRule, sessionRule.keyspace());
+ session.execute("DROP TABLE IF EXISTS test_table_1");
+ session.execute("CREATE TABLE test_table_1 (k int primary key, v int)");
+ session.execute("INSERT INTO test_table_1 (k,v) VALUES (1, 100)");
+ session.execute("INSERT INTO test_table_1 (k,v) VALUES (2, 200)");
+ session.execute("INSERT INTO test_table_1 (k,v) VALUES (3, 300)");
+ session.close();
+ }
+
+ @After
+ public void teardown() {
+
+ CqlSession session = SessionUtils.newSession(ccmRule, sessionRule.keyspace());
+ session.execute("DROP TABLE test_table_1");
+ session.close();
+ }
+
+ private CompletableFuture toCompletableFuture(CqlSession session, String cql) {
+
+ return session.prepareAsync(cql).toCompletableFuture();
+ }
+
+ private CqlPrepareAsyncProcessor findProcessor(CqlSession session) {
+
+ DefaultDriverContext context = (DefaultDriverContext) session.getContext();
+ return (CqlPrepareAsyncProcessor)
+ Iterables.find(
+ context.getRequestProcessorRegistry().getProcessors(),
+ Predicates.instanceOf(CqlPrepareAsyncProcessor.class));
+ }
+
+ @Test
+ public void should_cache_valid_cql() throws Exception {
+
+ CqlSession session = SessionUtils.newSession(ccmRule, sessionRule.keyspace());
+ CqlPrepareAsyncProcessor processor = findProcessor(session);
+ Cache> cache = processor.getCache();
+ assertThat(cache.size()).isEqualTo(0);
+
+ // Make multiple CompletableFuture requests for the specified CQL, then wait until
+ // the cached request finishes and confirm that all futures got the same values
+ String cql = "select v from test_table_1 where k = ?";
+ CompletableFuture cf1 = toCompletableFuture(session, cql);
+ CompletableFuture cf2 = toCompletableFuture(session, cql);
+ assertThat(cache.size()).isEqualTo(1);
+
+ CompletableFuture future = Iterables.get(cache.asMap().values(), 0);
+ PreparedStatement stmt = future.get();
+
+ assertThat(cf1.isDone()).isTrue();
+ assertThat(cf2.isDone()).isTrue();
+
+ assertThat(cf1.join()).isEqualTo(stmt);
+ assertThat(cf2.join()).isEqualTo(stmt);
+ }
+
+ // A holdover from work done on JAVA-3055. This probably isn't _desired_ behaviour but this test
+ // documents the fact that the current driver impl will behave in this way. We should probably
+ // consider changing this in a future release, although it's worthwhile fully considering the
+ // implications of such a change.
+ @Test
+ public void will_cache_invalid_cql() throws Exception {
+
+ CqlSession session = SessionUtils.newSession(ccmRule, sessionRule.keyspace());
+ CqlPrepareAsyncProcessor processor = findProcessor(session);
+ Cache> cache = processor.getCache();
+ assertThat(cache.size()).isEqualTo(0);
+
+ // Verify that we get the CompletableFuture even if the CQL is invalid but that nothing is
+ // cached
+ String cql = "select v fromfrom test_table_1 where k = ?";
+ CompletableFuture cf = toCompletableFuture(session, cql);
+
+ // join() here should throw exceptions due to the invalid syntax... for purposes of this test we
+ // can ignore this
+ try {
+ cf.join();
+ fail();
+ } catch (Exception e) {
+ }
+
+ assertThat(cache.size()).isEqualTo(1);
+ }
+
+ @Test
+ public void should_not_affect_cache_if_returned_futures_are_cancelled() throws Exception {
+
+ CqlSession session = SessionUtils.newSession(ccmRule, sessionRule.keyspace());
+ CqlPrepareAsyncProcessor processor = findProcessor(session);
+ Cache> cache = processor.getCache();
+ assertThat(cache.size()).isEqualTo(0);
+
+ String cql = "select v from test_table_1 where k = ?";
+ CompletableFuture cf = toCompletableFuture(session, cql);
+
+ assertThat(cf.isCancelled()).isFalse();
+ assertThat(cf.cancel(false)).isTrue();
+ assertThat(cf.isCancelled()).isTrue();
+ assertThat(cf.isCompletedExceptionally()).isTrue();
+
+ // Confirm that cancelling the CompletableFuture returned to the user does _not_ cancel the
+ // future used within the cache. CacheEntry very deliberately doesn't maintain a reference
+ // to it's contained CompletableFuture so we have to get at this by secondary effects.
+ assertThat(cache.size()).isEqualTo(1);
+ CompletableFuture future = Iterables.get(cache.asMap().values(), 0);
+ PreparedStatement rv = future.get();
+ assertThat(rv).isNotNull();
+ assertThat(rv.getQuery()).isEqualTo(cql);
+ assertThat(cache.size()).isEqualTo(1);
+ }
+}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementIT.java
index 1b07edb53af..5671a7684e5 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,7 +18,7 @@
package com.datastax.oss.driver.core.cql;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.catchThrowable;
import com.codahale.metrics.Gauge;
@@ -34,8 +36,9 @@
import com.datastax.oss.driver.api.core.metrics.DefaultSessionMetric;
import com.datastax.oss.driver.api.core.servererrors.InvalidQueryException;
import com.datastax.oss.driver.api.core.type.DataTypes;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -48,6 +51,7 @@
import java.time.Duration;
import java.util.concurrent.CompletionStage;
import junit.framework.TestCase;
+import org.assertj.core.api.AbstractThrowableAssert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -145,7 +149,7 @@ public void should_have_non_empty_variable_definitions_for_select_query_with_bou
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_update_metadata_when_schema_changed_across_executions() {
// Given
CqlSession session = sessionRule.session();
@@ -174,7 +178,7 @@ public void should_update_metadata_when_schema_changed_across_executions() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_update_metadata_when_schema_changed_across_pages() {
// Given
CqlSession session = sessionRule.session();
@@ -219,7 +223,7 @@ public void should_update_metadata_when_schema_changed_across_pages() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_update_metadata_when_schema_changed_across_sessions() {
// Given
CqlSession session1 = sessionRule.session();
@@ -266,7 +270,7 @@ public void should_update_metadata_when_schema_changed_across_sessions() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_fail_to_reprepare_if_query_becomes_invalid() {
// Given
CqlSession session = sessionRule.session();
@@ -285,13 +289,13 @@ public void should_fail_to_reprepare_if_query_becomes_invalid() {
}
@Test
- @CassandraRequirement(min = "4.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0")
public void should_not_store_metadata_for_conditional_updates() {
should_not_store_metadata_for_conditional_updates(sessionRule.session());
}
@Test
- @CassandraRequirement(min = "2.2")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public void should_not_store_metadata_for_conditional_updates_in_legacy_protocol() {
DriverConfigLoader loader =
SessionUtils.configLoaderBuilder()
@@ -368,9 +372,15 @@ public void should_return_same_instance_when_repreparing_query() {
assertThat(getPreparedCacheSize(session)).isEqualTo(0);
String query = "SELECT * FROM prepared_statement_test WHERE a = ?";
- // When
- PreparedStatement preparedStatement1 = session.prepare(query);
- PreparedStatement preparedStatement2 = session.prepare(query);
+ // Send prepare requests, keep hold of CompletionStage objects to prevent them being removed
+ // from CqlPrepareAsyncProcessor#cache, see JAVA-3062
+ CompletionStage preparedStatement1Future = session.prepareAsync(query);
+ CompletionStage preparedStatement2Future = session.prepareAsync(query);
+
+ PreparedStatement preparedStatement1 =
+ CompletableFutures.getUninterruptibly(preparedStatement1Future);
+ PreparedStatement preparedStatement2 =
+ CompletableFutures.getUninterruptibly(preparedStatement2Future);
// Then
assertThat(preparedStatement1).isSameAs(preparedStatement2);
@@ -385,11 +395,17 @@ public void should_create_separate_instances_for_differently_formatted_queries()
// Given
assertThat(getPreparedCacheSize(session)).isEqualTo(0);
- // When
+ // Send prepare requests, keep hold of CompletionStage objects to prevent them being removed
+ // from CqlPrepareAsyncProcessor#cache, see JAVA-3062
+ CompletionStage preparedStatement1Future =
+ session.prepareAsync("SELECT * FROM prepared_statement_test WHERE a = ?");
+ CompletionStage preparedStatement2Future =
+ session.prepareAsync("select * from prepared_statement_test where a = ?");
+
PreparedStatement preparedStatement1 =
- session.prepare("SELECT * FROM prepared_statement_test WHERE a = ?");
+ CompletableFutures.getUninterruptibly(preparedStatement1Future);
PreparedStatement preparedStatement2 =
- session.prepare("select * from prepared_statement_test where a = ?");
+ CompletableFutures.getUninterruptibly(preparedStatement2Future);
// Then
assertThat(preparedStatement1).isNotSameAs(preparedStatement2);
@@ -405,9 +421,17 @@ public void should_create_separate_instances_for_different_statement_parameters(
SimpleStatement statement =
SimpleStatement.newInstance("SELECT * FROM prepared_statement_test");
- // When
- PreparedStatement preparedStatement1 = session.prepare(statement.setPageSize(1));
- PreparedStatement preparedStatement2 = session.prepare(statement.setPageSize(4));
+ // Send prepare requests, keep hold of CompletionStage objects to prevent them being removed
+ // from CqlPrepareAsyncProcessor#cache, see JAVA-3062
+ CompletionStage preparedStatement1Future =
+ session.prepareAsync(statement.setPageSize(1));
+ CompletionStage preparedStatement2Future =
+ session.prepareAsync(statement.setPageSize(4));
+
+ PreparedStatement preparedStatement1 =
+ CompletableFutures.getUninterruptibly(preparedStatement1Future);
+ PreparedStatement preparedStatement2 =
+ CompletableFutures.getUninterruptibly(preparedStatement2Future);
// Then
assertThat(preparedStatement1).isNotSameAs(preparedStatement2);
@@ -419,13 +443,11 @@ public void should_create_separate_instances_for_different_statement_parameters(
}
/**
- * This test relies on CASSANDRA-15252 to reproduce the error condition. If the bug gets fixed in
- * Cassandra, we'll need to add a version restriction.
+ * This method reproduces CASSANDRA-15252 which is fixed in 3.0.26/3.11.12/4.0.2.
*
* @see CASSANDRA-15252
*/
- @Test
- public void should_fail_fast_if_id_changes_on_reprepare() {
+ private AbstractThrowableAssert, ? extends Throwable> assertableReprepareAfterIdChange() {
try (CqlSession session = SessionUtils.newSession(ccmRule)) {
PreparedStatement preparedStatement =
session.prepare(
@@ -438,12 +460,42 @@ public void should_fail_fast_if_id_changes_on_reprepare() {
executeDdl("DROP TABLE prepared_statement_test");
executeDdl("CREATE TABLE prepared_statement_test (a int PRIMARY KEY, b int, c int)");
- assertThatThrownBy(() -> session.execute(preparedStatement.bind(1)))
- .isInstanceOf(IllegalStateException.class)
- .hasMessageContaining("ID mismatch while trying to reprepare");
+ return assertThatCode(() -> session.execute(preparedStatement.bind(1)));
}
}
+ // Add version bounds to the DSE requirement if there is a version containing fix for
+ // CASSANDRA-15252
+ @BackendRequirement(
+ type = BackendType.DSE,
+ description = "No DSE version contains fix for CASSANDRA-15252")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "3.0.0", maxExclusive = "3.0.26")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.11.0",
+ maxExclusive = "3.11.12")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0.0", maxExclusive = "4.0.2")
+ @Test
+ public void should_fail_fast_if_id_changes_on_reprepare() {
+ assertableReprepareAfterIdChange()
+ .isInstanceOf(IllegalStateException.class)
+ .hasMessageContaining("ID mismatch while trying to reprepare");
+ }
+
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.0.26",
+ maxExclusive = "3.11.0")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.11.12",
+ maxExclusive = "4.0.0")
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "4.0.2")
+ @Test
+ public void handle_id_changes_on_reprepare() {
+ assertableReprepareAfterIdChange().doesNotThrowAnyException();
+ }
+
@Test
public void should_infer_routing_information_when_partition_key_is_bound() {
should_infer_routing_information_when_partition_key_is_bound(
@@ -475,6 +527,25 @@ private void should_infer_routing_information_when_partition_key_is_bound(String
assertThat(tokenFactory.hash(boundStatement.getRoutingKey())).isEqualTo(expectedToken);
}
+ @Test
+ public void should_return_null_routing_information_when_single_partition_key_is_unbound() {
+ should_return_null_routing_information_when_single_partition_key_is_unbound(
+ "SELECT a FROM prepared_statement_test WHERE a = ?");
+ should_return_null_routing_information_when_single_partition_key_is_unbound(
+ "INSERT INTO prepared_statement_test (a) VALUES (?)");
+ should_return_null_routing_information_when_single_partition_key_is_unbound(
+ "UPDATE prepared_statement_test SET b = 1 WHERE a = ?");
+ should_return_null_routing_information_when_single_partition_key_is_unbound(
+ "DELETE FROM prepared_statement_test WHERE a = ?");
+ }
+
+ private void should_return_null_routing_information_when_single_partition_key_is_unbound(
+ String queryString) {
+ CqlSession session = sessionRule.session();
+ BoundStatement boundStatement = session.prepare(queryString).bind();
+ assertThat(boundStatement.getRoutingKey()).isNull();
+ }
+
private static Iterable firstPageOf(CompletionStage stage) {
return CompletableFutures.getUninterruptibly(stage).currentPage();
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/QueryTraceIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/QueryTraceIT.java
index 8c12e7154fc..37a600efbc4 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/QueryTraceIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/QueryTraceIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,6 +28,7 @@
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.metadata.EndPoint;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import java.net.InetAddress;
@@ -80,7 +83,7 @@ public void should_fetch_trace_when_tracing_enabled() {
InetAddress nodeAddress = ((InetSocketAddress) contactPoint.resolve()).getAddress();
boolean expectPorts =
CCM_RULE.getCassandraVersion().nextStable().compareTo(Version.V4_0_0) >= 0
- && !CCM_RULE.getDseVersion().isPresent();
+ && !CCM_RULE.isDistributionOf(BackendType.DSE);
QueryTrace queryTrace = executionInfo.getQueryTrace();
assertThat(queryTrace.getTracingId()).isEqualTo(executionInfo.getTracingId());
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementCcmIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementCcmIT.java
index a237c23a9ef..b903f59efcc 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementCcmIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementCcmIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementSimulacronIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementSimulacronIT.java
index e3daeaf0a03..bb8b4f6b731 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementSimulacronIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/SimpleStatementSimulacronIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/DefaultReactiveResultSetIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/DefaultReactiveResultSetIT.java
index 0dec461d1e5..c00cf064e51 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/DefaultReactiveResultSetIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/DefaultReactiveResultSetIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,6 +32,7 @@
import com.datastax.oss.driver.api.core.cql.PreparedStatement;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.cql.EmptyColumnDefinitions;
@@ -62,20 +65,23 @@ public class DefaultReactiveResultSetIT {
@BeforeClass
public static void initialize() {
CqlSession session = sessionRule.session();
- session.execute("DROP TABLE IF EXISTS test_reactive_read");
- session.execute("DROP TABLE IF EXISTS test_reactive_write");
- session.checkSchemaAgreement();
- session.execute(
- SimpleStatement.builder(
- "CREATE TABLE test_reactive_read (pk int, cc int, v int, PRIMARY KEY ((pk), cc))")
- .setExecutionProfile(sessionRule.slowProfile())
- .build());
- session.execute(
- SimpleStatement.builder(
- "CREATE TABLE test_reactive_write (pk int, cc int, v int, PRIMARY KEY ((pk), cc))")
- .setExecutionProfile(sessionRule.slowProfile())
- .build());
- session.checkSchemaAgreement();
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ session.execute("DROP TABLE IF EXISTS test_reactive_read");
+ session.execute("DROP TABLE IF EXISTS test_reactive_write");
+ session.checkSchemaAgreement();
+ session.execute(
+ SimpleStatement.builder(
+ "CREATE TABLE test_reactive_read (pk int, cc int, v int, PRIMARY KEY ((pk), cc))")
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+ session.execute(
+ SimpleStatement.builder(
+ "CREATE TABLE test_reactive_write (pk int, cc int, v int, PRIMARY KEY ((pk), cc))")
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+ session.checkSchemaAgreement();
+ });
for (int i = 0; i < 1000; i++) {
session.execute(
SimpleStatement.builder("INSERT INTO test_reactive_read (pk, cc, v) VALUES (0, ?, ?)")
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/ReactiveRetryIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/ReactiveRetryIT.java
index 32f7c329bfa..e59c29f4262 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/ReactiveRetryIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/ReactiveRetryIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/data/DataTypeIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/data/DataTypeIT.java
index 99fe014f180..e3d891454de 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/data/DataTypeIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/data/DataTypeIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,6 +32,7 @@
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.cql.Statement;
import com.datastax.oss.driver.api.core.data.CqlDuration;
+import com.datastax.oss.driver.api.core.data.CqlVector;
import com.datastax.oss.driver.api.core.data.SettableByIndex;
import com.datastax.oss.driver.api.core.data.SettableByName;
import com.datastax.oss.driver.api.core.data.TupleValue;
@@ -181,6 +184,7 @@ public static Object[][] typeSamples() {
// 5) include map
// 6) include tuple
// 7) include udt
+ // 8) include vector
return Arrays.stream(primitiveSamples)
.flatMap(
o -> {
@@ -261,6 +265,30 @@ public static Object[][] typeSamples() {
UdtValue udtValue2 = udt.newValue(1, o[1]);
samples.add(new Object[] {udt, udtValue2});
+ if (CCM_RULE.getCassandraVersion().compareTo(Version.parse("5.0")) >= 0) {
+ // vector of type
+ CqlVector> vector = CqlVector.newInstance(o[1]);
+ samples.add(new Object[] {DataTypes.vectorOf(dataType, 1), vector});
+ }
+
+ return samples.stream();
+ })
+ .toArray(Object[][]::new);
+ }
+
+ @DataProvider
+ public static Object[][] addVectors() {
+ Object[][] previousSamples = typeSamples();
+ if (CCM_RULE.getCassandraVersion().compareTo(Version.parse("5.0")) < 0) return previousSamples;
+ return Arrays.stream(previousSamples)
+ .flatMap(
+ o -> {
+ List samples = new ArrayList<>();
+ samples.add(o);
+ if (o[1] == null) return samples.stream();
+ DataType dataType = (DataType) o[0];
+ CqlVector> vector = CqlVector.newInstance(o[1]);
+ samples.add(new Object[] {DataTypes.vectorOf(dataType, 1), vector});
return samples.stream();
})
.toArray(Object[][]::new);
@@ -276,7 +304,7 @@ public static void createTable() {
List columnData = new ArrayList<>();
- for (Object[] sample : typeSamples()) {
+ for (Object[] sample : addVectors()) {
DataType dataType = (DataType) sample[0];
if (!typeToColumnName.containsKey(dataType)) {
@@ -306,7 +334,7 @@ private static int nextKey() {
return keyCounter.incrementAndGet();
}
- @UseDataProvider("typeSamples")
+ @UseDataProvider("addVectors")
@Test
public void should_insert_non_primary_key_column_simple_statement_using_format(
DataType dataType, K value, K expectedPrimitiveValue) {
@@ -333,7 +361,7 @@ public void should_insert_non_primary_key_column_simple_statement_using_form
readValue(select, dataType, value, expectedPrimitiveValue);
}
- @UseDataProvider("typeSamples")
+ @UseDataProvider("addVectors")
@Test
public void should_insert_non_primary_key_column_simple_statement_positional_value(
DataType dataType, K value, K expectedPrimitiveValue) {
@@ -356,7 +384,7 @@ public void should_insert_non_primary_key_column_simple_statement_positional
readValue(select, dataType, value, expectedPrimitiveValue);
}
- @UseDataProvider("typeSamples")
+ @UseDataProvider("addVectors")
@Test
public void should_insert_non_primary_key_column_simple_statement_named_value(
DataType dataType, K value, K expectedPrimitiveValue) {
@@ -380,7 +408,7 @@ public void should_insert_non_primary_key_column_simple_statement_named_valu
readValue(select, dataType, value, expectedPrimitiveValue);
}
- @UseDataProvider("typeSamples")
+ @UseDataProvider("addVectors")
@Test
public void should_insert_non_primary_key_column_bound_statement_positional_value(
DataType dataType, K value, K expectedPrimitiveValue) {
@@ -409,7 +437,7 @@ public void should_insert_non_primary_key_column_bound_statement_positional_
readValue(boundSelect, dataType, value, expectedPrimitiveValue);
}
- @UseDataProvider("typeSamples")
+ @UseDataProvider("addVectors")
@Test
public void should_insert_non_primary_key_column_bound_statement_named_value(
DataType dataType, K value, K expectedPrimitiveValue) {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatDisabledIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatDisabledIT.java
index f0afc0058c0..7d90f124fb3 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatDisabledIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatDisabledIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatIT.java
index 1dbc055a5af..26658bd76d1 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/heartbeat/HeartbeatIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/AllLoadBalancingPoliciesSimulacronIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/AllLoadBalancingPoliciesSimulacronIT.java
index bee2aa21fb6..855cd6bb6a2 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/AllLoadBalancingPoliciesSimulacronIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/AllLoadBalancingPoliciesSimulacronIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/DefaultLoadBalancingPolicyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/DefaultLoadBalancingPolicyIT.java
index b74a28243a1..af454fc6458 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/DefaultLoadBalancingPolicyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/DefaultLoadBalancingPolicyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/NodeTargetingIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/NodeTargetingIT.java
index a3616ea91b9..f6a6176568a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/NodeTargetingIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/NodeTargetingIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/PerProfileLoadBalancingPolicyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/PerProfileLoadBalancingPolicyIT.java
index 12d5c800d88..5113a8861b0 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/PerProfileLoadBalancingPolicyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/loadbalancing/PerProfileLoadBalancingPolicyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenIT.java
index 28795b6c4c4..278bb106eda 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,8 +19,9 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.metadata.token.ByteOrderedToken;
@@ -28,8 +31,9 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@CassandraRequirement(
- max = "4.0-beta4",
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ maxExclusive = "4.0-beta4",
description =
"Token allocation is not compatible with this partitioner, "
+ "but is enabled by default in C* 4.0 (see CASSANDRA-7032 and CASSANDRA-13701)")
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenVnodesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenVnodesIT.java
index 1009013c734..4d7cf8ad631 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenVnodesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/ByteOrderedTokenVnodesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,8 +19,9 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.metadata.token.ByteOrderedToken;
@@ -28,8 +31,9 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@CassandraRequirement(
- max = "4.0-beta4",
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ maxExclusive = "4.0-beta4",
description =
"Token allocation is not compatible with this partitioner, "
+ "but is enabled by default in C* 4.0 (see CASSANDRA-7032 and CASSANDRA-13701)")
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/CaseSensitiveUdtIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/CaseSensitiveUdtIT.java
index 4e1fda2aa3c..f80b02207f8 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/CaseSensitiveUdtIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/CaseSensitiveUdtIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/DescribeIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/DescribeIT.java
index ade31eebc24..4d6c2a7a3b1 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/DescribeIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/DescribeIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,6 +28,8 @@
import com.datastax.oss.driver.api.core.metadata.schema.KeyspaceMetadata;
import com.datastax.oss.driver.api.core.metadata.schema.TableMetadata;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -34,12 +38,14 @@
import com.datastax.oss.driver.internal.core.metadata.schema.DefaultTableMetadata;
import com.datastax.oss.driver.shaded.guava.common.base.Charsets;
import com.datastax.oss.driver.shaded.guava.common.base.Splitter;
+import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableMap;
import com.google.common.io.Files;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.time.Duration;
import java.util.List;
+import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
import org.junit.BeforeClass;
@@ -76,17 +82,23 @@ public class DescribeIT {
Splitter.on(Pattern.compile(";\n")).omitEmptyStrings();
private static Version serverVersion;
- private static boolean isDse;
+
+ private static final Map scriptFileForBackend =
+ ImmutableMap.builder()
+ .put(BackendType.CASSANDRA, "DescribeIT/oss")
+ .put(BackendType.DSE, "DescribeIT/dse")
+ .put(BackendType.HCD, "DescribeIT/hcd")
+ .build();
private static File scriptFile;
private static String scriptContents;
@BeforeClass
public static void setup() {
- Optional dseVersion = CCM_RULE.getDseVersion();
- isDse = dseVersion.isPresent();
serverVersion =
- isDse ? dseVersion.get().nextStable() : CCM_RULE.getCassandraVersion().nextStable();
+ CCM_RULE.isDistributionOf(BackendType.CASSANDRA)
+ ? CCM_RULE.getCassandraVersion().nextStable()
+ : CCM_RULE.getDistributionVersion().nextStable();
scriptFile = getScriptFile();
assertThat(scriptFile).exists();
@@ -111,12 +123,12 @@ public void describe_output_should_match_creation_script() throws Exception {
"Describe output doesn't match create statements, "
+ "maybe you need to add a new script in integration-tests/src/test/resources. "
+ "Server version = %s %s, used script = %s",
- isDse ? "DSE" : "Cassandra", serverVersion, scriptFile)
+ CCM_RULE.getDistribution(), serverVersion, scriptFile)
.isEqualTo(scriptContents);
}
private boolean atLeastVersion(Version dseVersion, Version ossVersion) {
- Version comparison = isDse ? dseVersion : ossVersion;
+ Version comparison = CCM_RULE.isDistributionOf(BackendType.DSE) ? dseVersion : ossVersion;
return serverVersion.compareTo(comparison) >= 0;
}
@@ -135,11 +147,9 @@ public void keyspace_metadata_should_be_serializable() throws Exception {
assertThat(ks.getUserDefinedTypes()).isNotEmpty();
assertThat(ks.getTables()).isNotEmpty();
if (atLeastVersion(Version.V5_0_0, Version.V3_0_0)) {
-
assertThat(ks.getViews()).isNotEmpty();
}
if (atLeastVersion(Version.V5_0_0, Version.V2_2_0)) {
-
assertThat(ks.getFunctions()).isNotEmpty();
assertThat(ks.getAggregates()).isNotEmpty();
}
@@ -174,7 +184,7 @@ private static File getScriptFile() {
logbackTestUrl);
}
File resourcesDir = new File(logbackTestUrl.getFile()).getParentFile();
- File scriptsDir = new File(resourcesDir, isDse ? "DescribeIT/dse" : "DescribeIT/oss");
+ File scriptsDir = new File(resourcesDir, scriptFileForBackend.get(CCM_RULE.getDistribution()));
LOG.debug("Looking for a matching script in directory {}", scriptsDir);
File[] candidates = scriptsDir.listFiles();
@@ -201,8 +211,7 @@ private static File getScriptFile() {
.as("Could not find create script with version <= %s in %s", serverVersion, scriptsDir)
.isNotNull();
- LOG.info(
- "Using {} to test against {} {}", bestFile, isDse ? "DSE" : "Cassandra", serverVersion);
+ LOG.info("Using {} to test against {} {}", bestFile, CCM_RULE.getDistribution(), serverVersion);
return bestFile;
}
@@ -222,15 +231,17 @@ private static String getScriptContents() {
private static void setupDatabase() {
List statements = STATEMENT_SPLITTER.splitToList(scriptContents);
-
- // Skip the first statement (CREATE KEYSPACE), we already have a keyspace
- for (int i = 1; i < statements.size(); i++) {
- String statement = statements.get(i);
- try {
- SESSION_RULE.session().execute(statement);
- } catch (Exception e) {
- fail("Error executing statement %s (%s)", statement, e);
- }
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ // Skip the first statement (CREATE KEYSPACE), we already have a keyspace
+ for (int i = 1; i < statements.size(); i++) {
+ String statement = statements.get(i);
+ try {
+ SESSION_RULE.session().execute(statement);
+ } catch (Exception e) {
+ fail("Error executing statement %s (%s)", statement, e);
+ }
+ }
+ });
}
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/MetadataIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/MetadataIT.java
index 2eb60a4e7ab..1b1aed4b3de 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/MetadataIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/MetadataIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenIT.java
index 9b3e4d77447..a119c503a20 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenVnodesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenVnodesIT.java
index 3dcf8f88b17..cb80abc0a3f 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenVnodesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/Murmur3TokenVnodesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,8 +19,9 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.metadata.token.Murmur3Token;
@@ -28,8 +31,9 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@CassandraRequirement(
- max = "4.0-beta4",
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ maxExclusive = "4.0-beta4",
// TODO Re-enable when CASSANDRA-16364 is fixed
description = "TODO Re-enable when CASSANDRA-16364 is fixed")
public class Murmur3TokenVnodesIT extends TokenITBase {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeMetadataIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeMetadataIT.java
index 32e8c3929a5..8f5680ff41a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeMetadataIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeMetadataIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,9 +25,10 @@
import com.datastax.oss.driver.api.core.loadbalancing.NodeDistance;
import com.datastax.oss.driver.api.core.metadata.Node;
import com.datastax.oss.driver.api.core.metadata.NodeState;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.context.EventBus;
@@ -59,8 +62,9 @@ public void should_expose_node_metadata() {
assertThat(node.getListenAddress().get().getAddress()).isEqualTo(connectAddress.getAddress());
assertThat(node.getDatacenter()).isEqualTo("dc1");
assertThat(node.getRack()).isEqualTo("r1");
- if (!CcmBridge.DSE_ENABLEMENT) {
- // CcmBridge does not report accurate C* versions for DSE, only approximated values
+ if (CcmBridge.isDistributionOf(BackendType.CASSANDRA)) {
+ // CcmBridge does not report accurate C* versions for other distributions (e.g. DSE), only
+ // approximated values
assertThat(node.getCassandraVersion()).isEqualTo(ccmRule.getCassandraVersion());
}
assertThat(node.getState()).isSameAs(NodeState.UP);
@@ -90,7 +94,7 @@ public void should_expose_node_metadata() {
}
@Test
- @DseRequirement(min = "5.1")
+ @BackendRequirement(type = BackendType.DSE, minInclusive = "5.1")
public void should_expose_dse_node_properties() {
try (CqlSession session = SessionUtils.newSession(ccmRule)) {
@@ -103,7 +107,7 @@ public void should_expose_dse_node_properties() {
DseNodeProperties.DSE_WORKLOADS,
DseNodeProperties.SERVER_ID);
assertThat(node.getExtras().get(DseNodeProperties.DSE_VERSION))
- .isEqualTo(ccmRule.getDseVersion().get());
+ .isEqualTo(ccmRule.getDistributionVersion());
assertThat(node.getExtras().get(DseNodeProperties.SERVER_ID)).isInstanceOf(String.class);
assertThat(node.getExtras().get(DseNodeProperties.DSE_WORKLOADS)).isInstanceOf(Set.class);
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeStateIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeStateIT.java
index 19dcacebe84..e468e0a10d7 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeStateIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/NodeStateIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenIT.java
index 075679ea1d1..603783afb34 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenVnodesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenVnodesIT.java
index 1545bd46104..683b5651f98 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenVnodesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/RandomTokenVnodesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,8 +19,9 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.internal.core.metadata.token.RandomToken;
@@ -28,8 +31,9 @@
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@CassandraRequirement(
- max = "4.0-beta4",
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ maxExclusive = "4.0-beta4",
// TODO Re-enable when CASSANDRA-16364 is fixed
description = "TODO Re-enable when CASSANDRA-16364 is fixed")
public class RandomTokenVnodesIT extends TokenITBase {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaAgreementIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaAgreementIT.java
index 54751bc8065..724508d38a3 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaAgreementIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaAgreementIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java
index fc6d1a84788..85fcfc02cdb 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,6 +33,7 @@
import com.datastax.oss.driver.api.core.type.DataTypes;
import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.google.common.collect.ImmutableList;
@@ -52,8 +55,8 @@ public class SchemaChangesIT {
static {
CustomCcmRule.Builder builder = CustomCcmRule.builder();
- if (!CcmBridge.DSE_ENABLEMENT
- && CcmBridge.VERSION.nextStable().compareTo(Version.V4_0_0) >= 0) {
+ if (!CcmBridge.isDistributionOf(
+ BackendType.DSE, (dist, cass) -> cass.nextStable().compareTo(Version.V4_0_0) >= 0)) {
builder.withCassandraConfiguration("enable_materialized_views", true);
}
CCM_RULE = builder.build();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaIT.java
index 1e2803c7ef4..df5571974c1 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,8 +33,9 @@
import com.datastax.oss.driver.api.core.metadata.schema.KeyspaceMetadata;
import com.datastax.oss.driver.api.core.metadata.schema.TableMetadata;
import com.datastax.oss.driver.api.core.type.DataTypes;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -185,7 +188,10 @@ public void should_refresh_schema_manually() {
}
}
- @CassandraRequirement(min = "4.0", description = "virtual tables introduced in 4.0")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "4.0",
+ description = "virtual tables introduced in 4.0")
@Test
public void should_get_virtual_metadata() {
skipIfDse60();
@@ -259,6 +265,33 @@ public void should_get_virtual_metadata() {
+ " total bigint,\n"
+ " unit text,\n"
+ " PRIMARY KEY (keyspace_name, table_name, task_id)\n"
+ + "); */",
+ // Cassandra 4.1
+ "/* VIRTUAL TABLE system_views.sstable_tasks (\n"
+ + " keyspace_name text,\n"
+ + " table_name text,\n"
+ + " task_id timeuuid,\n"
+ + " completion_ratio double,\n"
+ + " kind text,\n"
+ + " progress bigint,\n"
+ + " sstables int,\n"
+ + " total bigint,\n"
+ + " unit text,\n"
+ + " PRIMARY KEY (keyspace_name, table_name, task_id)\n"
+ + "); */",
+ // Cassandra 5.0
+ "/* VIRTUAL TABLE system_views.sstable_tasks (\n"
+ + " keyspace_name text,\n"
+ + " table_name text,\n"
+ + " task_id timeuuid,\n"
+ + " completion_ratio double,\n"
+ + " kind text,\n"
+ + " progress bigint,\n"
+ + " sstables int,\n"
+ + " target_directory text,\n"
+ + " total bigint,\n"
+ + " unit text,\n"
+ + " PRIMARY KEY (keyspace_name, table_name, task_id)\n"
+ "); */");
// ColumnMetadata is as expected
ColumnMetadata cm = tm.getColumn("progress").get();
@@ -269,7 +302,10 @@ public void should_get_virtual_metadata() {
}
}
- @CassandraRequirement(min = "4.0", description = "virtual tables introduced in 4.0")
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "4.0",
+ description = "virtual tables introduced in 4.0")
@Test
public void should_exclude_virtual_keyspaces_from_token_map() {
skipIfDse60();
@@ -299,11 +335,9 @@ public void should_exclude_virtual_keyspaces_from_token_map() {
private void skipIfDse60() {
// Special case: DSE 6.0 reports C* 4.0 but does not support virtual tables
- if (ccmRule.getDseVersion().isPresent()) {
- Version dseVersion = ccmRule.getDseVersion().get();
- if (dseVersion.compareTo(DSE_MIN_VIRTUAL_TABLES) < 0) {
- throw new AssumptionViolatedException("DSE 6.0 does not support virtual tables");
- }
+ if (!ccmRule.isDistributionOf(
+ BackendType.DSE, (dist, cass) -> dist.compareTo(DSE_MIN_VIRTUAL_TABLES) >= 0)) {
+ throw new AssumptionViolatedException("DSE 6.0 does not support virtual tables");
}
}
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java
index 4ca72c94be3..057461a1bd7 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/DropwizardMetricsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/DropwizardMetricsIT.java
index 9a769c3c02d..e0184516e21 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/DropwizardMetricsIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/DropwizardMetricsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -196,6 +198,12 @@ protected void assertNodeMetricsNotEvicted(CqlSession session, Node node) {
}
}
+ @Override
+ protected void assertMetricsNotPresent(Object registry) {
+ MetricRegistry dropwizardRegistry = (MetricRegistry) registry;
+ assertThat(dropwizardRegistry.getMetrics()).isEmpty();
+ }
+
@Override
protected void assertNodeMetricsEvicted(CqlSession session, Node node) {
InternalDriverContext context = (InternalDriverContext) session.getContext();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/MetricsITBase.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/MetricsITBase.java
index b8ee7ed1b03..e6121217619 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/MetricsITBase.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/MetricsITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -81,8 +83,10 @@ public void resetSimulacron() {
@Test
@UseDataProvider("descriptorsAndPrefixes")
- public void should_expose_metrics_if_enabled(Class> metricIdGenerator, String prefix) {
+ public void should_expose_metrics_if_enabled_and_clear_metrics_if_closed(
+ Class> metricIdGenerator, String prefix) {
+ Object registry = newMetricRegistry();
Assume.assumeFalse(
"Cannot use metric tags with Dropwizard",
metricIdGenerator.getSimpleName().contains("Tagging")
@@ -99,12 +103,14 @@ public void should_expose_metrics_if_enabled(Class> metricIdGenerator, String
CqlSession.builder()
.addContactEndPoints(simulacron().getContactPoints())
.withConfigLoader(loader)
- .withMetricRegistry(newMetricRegistry())
+ .withMetricRegistry(registry)
.build()) {
session.prepare("irrelevant");
queryAllNodes(session);
assertMetricsPresent(session);
+ } finally {
+ assertMetricsNotPresent(registry);
}
}
@@ -260,4 +266,6 @@ private DefaultNode findNode(CqlSession session, int id) {
return (DefaultNode)
session.getMetadata().findNode(address1).orElseThrow(IllegalStateException::new);
}
+
+ protected abstract void assertMetricsNotPresent(Object registry);
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/ConsistencyDowngradingRetryPolicyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/ConsistencyDowngradingRetryPolicyIT.java
index b0707f0356f..0cab12c7fc4 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/ConsistencyDowngradingRetryPolicyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/ConsistencyDowngradingRetryPolicyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/DefaultRetryPolicyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/DefaultRetryPolicyIT.java
index 6474ee91a4c..4a3cebf914f 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/DefaultRetryPolicyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/DefaultRetryPolicyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/PerProfileRetryPolicyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/PerProfileRetryPolicyIT.java
index e3dd15e2f0e..b2e53bb09d0 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/PerProfileRetryPolicyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/retry/PerProfileRetryPolicyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/AddedNodeIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/AddedNodeIT.java
index 0d0edb0c6f7..1ce3fd1ca0e 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/AddedNodeIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/AddedNodeIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ExceptionIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ExceptionIT.java
index abb939e0607..b3a96dde3b9 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ExceptionIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ExceptionIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ListenersIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ListenersIT.java
index 690c00a0e9b..0fa089483fd 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ListenersIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ListenersIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,6 +19,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
import com.datastax.oss.driver.api.core.CqlSession;
@@ -33,9 +36,12 @@
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.api.testinfra.simulacron.SimulacronRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
+import com.datastax.oss.driver.shaded.guava.common.util.concurrent.Uninterruptibles;
import com.datastax.oss.simulacron.common.cluster.ClusterSpec;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.Collections;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -90,6 +96,9 @@ public void should_inject_session_in_listeners() throws Exception {
.build())
.build()) {
+ // These NodeStateListeners are wrapped with SafeInitNodeStateListener which delays #onUp
+ // callbacks until #onSessionReady is called, these will all happen during session
+ // initialization
InOrder inOrder1 = inOrder(nodeListener1);
inOrder1.verify(nodeListener1).onSessionReady(session);
inOrder1.verify(nodeListener1).onUp(nodeCaptor1.capture());
@@ -104,20 +113,29 @@ public void should_inject_session_in_listeners() throws Exception {
assertThat(nodeCaptor2.getValue().getEndPoint())
.isEqualTo(SIMULACRON_RULE.getContactPoints().iterator().next());
- verify(schemaListener1).onSessionReady(session);
- verify(schemaListener2).onSessionReady(session);
+ // SchemaChangeListener#onSessionReady is called asynchronously from AdminExecutor so we may
+ // have to wait a little
+ verify(schemaListener1, timeout(500).times(1)).onSessionReady(session);
+ verify(schemaListener2, timeout(500).times(1)).onSessionReady(session);
+ // Request tracker #onSessionReady is called synchronously during session initialization
verify(requestTracker1).onSessionReady(session);
verify(requestTracker2).onSessionReady(session);
assertThat(MyNodeStateListener.onSessionReadyCalled).isTrue();
assertThat(MyNodeStateListener.onUpCalled).isTrue();
- assertThat(MySchemaChangeListener.onSessionReadyCalled).isTrue();
+ // SchemaChangeListener#onSessionReady is called asynchronously from AdminExecutor so we may
+ // have to wait a little
+ assertThat(
+ Uninterruptibles.awaitUninterruptibly(
+ MySchemaChangeListener.onSessionReadyLatch, 500, TimeUnit.MILLISECONDS))
+ .isTrue();
assertThat(MyRequestTracker.onSessionReadyCalled).isTrue();
}
+ // CqlSession#close waits for all listener close methods to be called
verify(nodeListener1).close();
verify(nodeListener2).close();
@@ -163,14 +181,14 @@ public void close() {
public static class MySchemaChangeListener extends SchemaChangeListenerBase {
- private static volatile boolean onSessionReadyCalled = false;
+ private static CountDownLatch onSessionReadyLatch = new CountDownLatch(1);
private static volatile boolean closeCalled = false;
public MySchemaChangeListener(@SuppressWarnings("unused") DriverContext ignored) {}
@Override
public void onSessionReady(@NonNull Session session) {
- onSessionReadyCalled = true;
+ onSessionReadyLatch.countDown();
}
@Override
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RemovedNodeIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RemovedNodeIT.java
index ca26e079491..e0f33291544 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RemovedNodeIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RemovedNodeIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RequestProcessorIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RequestProcessorIT.java
index ef6b83f57dc..e2b3caeb1f4 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RequestProcessorIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/RequestProcessorIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ShutdownIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ShutdownIT.java
index 6a1bac5cc9b..7763f1ba866 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ShutdownIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/session/ShutdownIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/specex/SpeculativeExecutionIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/specex/SpeculativeExecutionIT.java
index 95d1c8e9cb9..cc13c821b9e 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/specex/SpeculativeExecutionIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/specex/SpeculativeExecutionIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryHostnameValidationIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryHostnameValidationIT.java
index e6f8260736f..e2e39be5cd6 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryHostnameValidationIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryHostnameValidationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryIT.java
index 8fd8567559b..a2afeade3ce 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,10 +21,13 @@
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
+import com.datastax.oss.driver.api.core.context.DriverContext;
import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
+import com.datastax.oss.driver.assertions.Assertions;
import com.datastax.oss.driver.internal.core.ssl.DefaultSslEngineFactory;
+import java.net.InetSocketAddress;
import org.junit.ClassRule;
import org.junit.Test;
@@ -86,4 +91,67 @@ public void should_not_connect_if_not_using_ssl() {
session.execute("select * from system.local");
}
}
+
+ public static class InstrumentedSslEngineFactory extends DefaultSslEngineFactory {
+ int countReverseLookups = 0;
+ int countNoLookups = 0;
+
+ public InstrumentedSslEngineFactory(DriverContext driverContext) {
+ super(driverContext);
+ }
+
+ @Override
+ protected String hostMaybeFromDnsReverseLookup(InetSocketAddress addr) {
+ countReverseLookups++;
+ return super.hostMaybeFromDnsReverseLookup(addr);
+ }
+
+ @Override
+ protected String hostNoLookup(InetSocketAddress addr) {
+ countNoLookups++;
+ return super.hostNoLookup(addr);
+ }
+ };
+
+ @Test
+ public void should_respect_config_for_san_resolution() {
+ DriverConfigLoader loader =
+ SessionUtils.configLoaderBuilder()
+ .withClass(
+ DefaultDriverOption.SSL_ENGINE_FACTORY_CLASS, InstrumentedSslEngineFactory.class)
+ .withBoolean(DefaultDriverOption.SSL_HOSTNAME_VALIDATION, false)
+ .withString(
+ DefaultDriverOption.SSL_TRUSTSTORE_PATH,
+ CcmBridge.DEFAULT_CLIENT_TRUSTSTORE_FILE.getAbsolutePath())
+ .withString(
+ DefaultDriverOption.SSL_TRUSTSTORE_PASSWORD,
+ CcmBridge.DEFAULT_CLIENT_TRUSTSTORE_PASSWORD)
+ .build();
+ try (CqlSession session = SessionUtils.newSession(CCM_RULE, loader)) {
+ InstrumentedSslEngineFactory ssl =
+ (InstrumentedSslEngineFactory) session.getContext().getSslEngineFactory().get();
+ Assertions.assertThat(ssl.countReverseLookups).isGreaterThan(0);
+ Assertions.assertThat(ssl.countNoLookups).isEqualTo(0);
+ }
+
+ loader =
+ SessionUtils.configLoaderBuilder()
+ .withClass(
+ DefaultDriverOption.SSL_ENGINE_FACTORY_CLASS, InstrumentedSslEngineFactory.class)
+ .withBoolean(DefaultDriverOption.SSL_HOSTNAME_VALIDATION, false)
+ .withString(
+ DefaultDriverOption.SSL_TRUSTSTORE_PATH,
+ CcmBridge.DEFAULT_CLIENT_TRUSTSTORE_FILE.getAbsolutePath())
+ .withString(
+ DefaultDriverOption.SSL_TRUSTSTORE_PASSWORD,
+ CcmBridge.DEFAULT_CLIENT_TRUSTSTORE_PASSWORD)
+ .withBoolean(DefaultDriverOption.SSL_ALLOW_DNS_REVERSE_LOOKUP_SAN, false)
+ .build();
+ try (CqlSession session = SessionUtils.newSession(CCM_RULE, loader)) {
+ InstrumentedSslEngineFactory ssl =
+ (InstrumentedSslEngineFactory) session.getContext().getSslEngineFactory().get();
+ Assertions.assertThat(ssl.countReverseLookups).isEqualTo(0);
+ Assertions.assertThat(ssl.countNoLookups).isGreaterThan(0);
+ }
+ }
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedIT.java
index 2c62cfdbc6e..fc6c67c0307 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedWithClientAuthIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedWithClientAuthIT.java
index ab6a38a9832..43f2b9d5a99 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedWithClientAuthIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryPropertyBasedWithClientAuthIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryWithClientAuthIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryWithClientAuthIT.java
index bd66fd8b04b..ab98dcc953d 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryWithClientAuthIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/DefaultSslEngineFactoryWithClientAuthIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/ProgrammaticSslIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/ProgrammaticSslIT.java
index 78d1d629df0..148c7c91baa 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/ProgrammaticSslIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/ssl/ProgrammaticSslIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/throttling/ThrottlingIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/throttling/ThrottlingIT.java
index f9491676fba..6fa1a37355b 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/throttling/ThrottlingIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/throttling/ThrottlingIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,13 +24,16 @@
import com.datastax.oss.driver.api.core.RequestThrottlingException;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
+import com.datastax.oss.driver.api.core.cql.AsyncResultSet;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.api.testinfra.simulacron.SimulacronRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.session.throttling.ConcurrencyLimitingRequestThrottler;
import com.datastax.oss.simulacron.common.cluster.ClusterSpec;
import com.datastax.oss.simulacron.common.stubbing.PrimeDsl;
+import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeUnit;
+import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -37,21 +42,20 @@
public class ThrottlingIT {
private static final String QUERY = "select * from foo";
+ private static final int maxConcurrentRequests = 10;
+ private static final int maxQueueSize = 10;
@Rule public SimulacronRule simulacron = new SimulacronRule(ClusterSpec.builder().withNodes(1));
- @Test
- public void should_reject_request_when_throttling_by_concurrency() {
+ private DriverConfigLoader loader = null;
+ @Before
+ public void setUp() {
// Add a delay so that requests don't complete during the test
simulacron
.cluster()
.prime(PrimeDsl.when(QUERY).then(PrimeDsl.noRows()).delay(5, TimeUnit.SECONDS));
-
- int maxConcurrentRequests = 10;
- int maxQueueSize = 10;
-
- DriverConfigLoader loader =
+ loader =
SessionUtils.configLoaderBuilder()
.withClass(
DefaultDriverOption.REQUEST_THROTTLER_CLASS,
@@ -61,7 +65,10 @@ public void should_reject_request_when_throttling_by_concurrency() {
maxConcurrentRequests)
.withInt(DefaultDriverOption.REQUEST_THROTTLER_MAX_QUEUE_SIZE, maxQueueSize)
.build();
+ }
+ @Test
+ public void should_reject_request_when_throttling_by_concurrency() {
try (CqlSession session = SessionUtils.newSession(simulacron, loader)) {
// Saturate the session and fill the queue
@@ -79,4 +86,19 @@ public void should_reject_request_when_throttling_by_concurrency() {
+ "(concurrent requests: 10, queue size: 10)");
}
}
+
+ @Test
+ public void should_propagate_cancel_to_throttler() {
+ try (CqlSession session = SessionUtils.newSession(simulacron, loader)) {
+
+ // Try to saturate the session and fill the queue
+ for (int i = 0; i < maxConcurrentRequests + maxQueueSize; i++) {
+ CompletionStage future = session.executeAsync(QUERY);
+ future.toCompletableFuture().cancel(true);
+ }
+
+ // The next query should be successful, because the previous queries were cancelled
+ session.execute(QUERY);
+ }
+ }
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestIdGeneratorIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestIdGeneratorIT.java
new file mode 100644
index 00000000000..516a62bb1f7
--- /dev/null
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestIdGeneratorIT.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.core.tracker;
+
+import static com.datastax.oss.driver.Assertions.assertThatStage;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.datastax.oss.driver.api.core.CqlSession;
+import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
+import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
+import com.datastax.oss.driver.api.core.cql.ResultSet;
+import com.datastax.oss.driver.api.core.cql.SimpleStatement;
+import com.datastax.oss.driver.api.core.cql.Statement;
+import com.datastax.oss.driver.api.core.session.Request;
+import com.datastax.oss.driver.api.core.tracker.RequestIdGenerator;
+import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
+import com.datastax.oss.driver.categories.ParallelizableTests;
+import com.datastax.oss.protocol.internal.util.collection.NullAllowingImmutableMap;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
+
+@Category(ParallelizableTests.class)
+public class RequestIdGeneratorIT {
+ private CcmRule ccmRule = CcmRule.getInstance();
+
+ @Rule public TestRule chain = RuleChain.outerRule(ccmRule);
+
+ @Test
+ public void should_write_uuid_to_custom_payload_with_key() {
+ DriverConfigLoader loader =
+ SessionUtils.configLoaderBuilder()
+ .withString(DefaultDriverOption.REQUEST_ID_GENERATOR_CLASS, "UuidRequestIdGenerator")
+ .build();
+ try (CqlSession session = SessionUtils.newSession(ccmRule, loader)) {
+ String query = "SELECT * FROM system.local";
+ ResultSet rs = session.execute(query);
+ ByteBuffer id = rs.getExecutionInfo().getRequest().getCustomPayload().get("request-id");
+ assertThat(id.remaining()).isEqualTo(73);
+ }
+ }
+
+ @Test
+ public void should_write_default_request_id_to_custom_payload_with_key() {
+ DriverConfigLoader loader =
+ SessionUtils.configLoaderBuilder()
+ .withString(
+ DefaultDriverOption.REQUEST_ID_GENERATOR_CLASS, "W3CContextRequestIdGenerator")
+ .build();
+ try (CqlSession session = SessionUtils.newSession(ccmRule, loader)) {
+ String query = "SELECT * FROM system.local";
+ ResultSet rs = session.execute(query);
+ ByteBuffer id = rs.getExecutionInfo().getRequest().getCustomPayload().get("request-id");
+ assertThat(id.remaining()).isEqualTo(55);
+ }
+ }
+
+ @Test
+ public void should_use_customized_request_id_generator() {
+ RequestIdGenerator myRequestIdGenerator =
+ new RequestIdGenerator() {
+ @Override
+ public String getSessionRequestId() {
+ return "123";
+ }
+
+ @Override
+ public String getNodeRequestId(@NonNull Request statement, @NonNull String parentId) {
+ return "456";
+ }
+
+ @Override
+ public Statement> getDecoratedStatement(
+ @NonNull Statement> statement, @NonNull String requestId) {
+ Map customPayload =
+ NullAllowingImmutableMap.builder()
+ .putAll(statement.getCustomPayload())
+ .put("trace_key", ByteBuffer.wrap(requestId.getBytes(StandardCharsets.UTF_8)))
+ .build();
+ return statement.setCustomPayload(customPayload);
+ }
+ };
+ try (CqlSession session =
+ (CqlSession)
+ SessionUtils.baseBuilder()
+ .addContactEndPoints(ccmRule.getContactPoints())
+ .withRequestIdGenerator(myRequestIdGenerator)
+ .build()) {
+ String query = "SELECT * FROM system.local";
+ ResultSet rs = session.execute(query);
+ ByteBuffer id = rs.getExecutionInfo().getRequest().getCustomPayload().get("trace_key");
+ assertThat(id).isEqualTo(ByteBuffer.wrap("456".getBytes(StandardCharsets.UTF_8)));
+ }
+ }
+
+ @Test
+ public void should_not_write_id_to_custom_payload_when_key_is_not_set() {
+ DriverConfigLoader loader = SessionUtils.configLoaderBuilder().build();
+ try (CqlSession session = SessionUtils.newSession(ccmRule, loader)) {
+ String query = "SELECT * FROM system.local";
+ ResultSet rs = session.execute(query);
+ assertThat(rs.getExecutionInfo().getRequest().getCustomPayload().get("request-id")).isNull();
+ }
+ }
+
+ @Test
+ public void should_succeed_with_null_value_in_custom_payload() {
+ DriverConfigLoader loader =
+ SessionUtils.configLoaderBuilder()
+ .withString(
+ DefaultDriverOption.REQUEST_ID_GENERATOR_CLASS, "W3CContextRequestIdGenerator")
+ .build();
+ try (CqlSession session = SessionUtils.newSession(ccmRule, loader)) {
+ String query = "SELECT * FROM system.local";
+ Map customPayload =
+ new NullAllowingImmutableMap.Builder(1).put("my_key", null).build();
+ SimpleStatement statement =
+ SimpleStatement.newInstance(query).setCustomPayload(customPayload);
+ assertThatStage(session.executeAsync(statement)).isSuccess();
+ }
+ }
+}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestLoggerIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestLoggerIT.java
index 252c22c5f7b..ae2c46fe4a0 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestLoggerIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestLoggerIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestNodeLoggerExample.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestNodeLoggerExample.java
index cf9ba4abd40..8eb2fb80a73 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestNodeLoggerExample.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/tracker/RequestNodeLoggerExample.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,7 +39,7 @@ public void onNodeError(
long latencyNanos,
@NonNull DriverExecutionProfile executionProfile,
@NonNull Node node,
- @NonNull String logPrefix) {
+ @NonNull String nodeRequestLogPrefix) {
if (!executionProfile.getBoolean(DefaultDriverOption.REQUEST_LOGGER_ERROR_ENABLED)) {
return;
}
@@ -64,7 +66,7 @@ public void onNodeError(
maxValues,
maxValueLength,
showStackTraces,
- logPrefix);
+ nodeRequestLogPrefix);
}
@Override
@@ -73,7 +75,7 @@ public void onNodeSuccess(
long latencyNanos,
@NonNull DriverExecutionProfile executionProfile,
@NonNull Node node,
- @NonNull String logPrefix) {
+ @NonNull String nodeRequestLogPrefix) {
boolean successEnabled =
executionProfile.getBoolean(DefaultDriverOption.REQUEST_LOGGER_SUCCESS_ENABLED);
boolean slowEnabled =
@@ -112,6 +114,6 @@ public void onNodeSuccess(
showValues,
maxValues,
maxValueLength,
- logPrefix);
+ nodeRequestLogPrefix);
}
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/CqlIntToStringCodec.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/CqlIntToStringCodec.java
index 9be7100036f..f509439fe35 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/CqlIntToStringCodec.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/CqlIntToStringCodec.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/ExtraTypeCodecsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/ExtraTypeCodecsIT.java
new file mode 100644
index 00000000000..c5db0376efb
--- /dev/null
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/ExtraTypeCodecsIT.java
@@ -0,0 +1,300 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.core.type.codec;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.datastax.oss.driver.api.core.CqlSession;
+import com.datastax.oss.driver.api.core.Version;
+import com.datastax.oss.driver.api.core.cql.BoundStatement;
+import com.datastax.oss.driver.api.core.cql.PreparedStatement;
+import com.datastax.oss.driver.api.core.cql.SimpleStatement;
+import com.datastax.oss.driver.api.core.type.codec.ExtraTypeCodecs;
+import com.datastax.oss.driver.api.core.type.codec.TypeCodec;
+import com.datastax.oss.driver.api.core.type.codec.TypeCodecs;
+import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
+import com.datastax.oss.driver.api.testinfra.session.SessionRule;
+import com.datastax.oss.driver.categories.ParallelizableTests;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.UUID;
+import java.util.stream.Stream;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
+
+@Category(ParallelizableTests.class)
+public class ExtraTypeCodecsIT {
+
+ private static final CcmRule CCM_RULE = CcmRule.getInstance();
+
+ private static final SessionRule SESSION_RULE = SessionRule.builder(CCM_RULE).build();
+
+ @ClassRule
+ public static final TestRule CHAIN = RuleChain.outerRule(CCM_RULE).around(SESSION_RULE);
+
+ private enum TableField {
+ cql_text("text_value", "text"),
+ cql_int("integer_value", "int"),
+ cql_vector("vector_value", "vector"),
+ cql_list_of_text("list_of_text_value", "list"),
+ cql_timestamp("timestamp_value", "timestamp"),
+ cql_boolean("boolean_value", "boolean"),
+ ;
+
+ final String name;
+ final String ty;
+
+ TableField(String name, String ty) {
+ this.name = name;
+ this.ty = ty;
+ }
+
+ private String definition() {
+ return String.format("%s %s", name, ty);
+ }
+ }
+
+ @BeforeClass
+ public static void setupSchema() {
+ List fieldDefinitions = new ArrayList<>();
+ fieldDefinitions.add("key uuid PRIMARY KEY");
+ Stream.of(TableField.values())
+ .forEach(
+ tf -> {
+ // TODO: Move this check to BackendRequirementRule once JAVA-3069 is resolved.
+ if (tf == TableField.cql_vector
+ && CCM_RULE.getCassandraVersion().compareTo(Version.parse("5.0")) < 0) {
+ // don't add vector type before cassandra version 5.0
+ return;
+ }
+ fieldDefinitions.add(tf.definition());
+ });
+ SESSION_RULE
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ String.format(
+ "CREATE TABLE IF NOT EXISTS extra_type_codecs_it (%s)",
+ String.join(", ", fieldDefinitions)))
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ }
+
+ private void insertAndRead(TableField field, T value, TypeCodec codec) {
+ CqlSession session = SESSION_RULE.session();
+ // write value under new key using provided codec
+ UUID key = UUID.randomUUID();
+
+ PreparedStatement preparedInsert =
+ session.prepare(
+ SimpleStatement.builder(
+ String.format(
+ "INSERT INTO extra_type_codecs_it (key, %s) VALUES (?, ?)", field.name))
+ .build());
+ BoundStatement boundInsert =
+ preparedInsert
+ .boundStatementBuilder()
+ .setUuid("key", key)
+ .set(field.name, value, codec)
+ .build();
+ session.execute(boundInsert);
+
+ // read value using provided codec and assert result
+ PreparedStatement preparedSelect =
+ session.prepare(
+ SimpleStatement.builder(
+ String.format("SELECT %s FROM extra_type_codecs_it WHERE key = ?", field.name))
+ .build());
+ BoundStatement boundSelect = preparedSelect.boundStatementBuilder().setUuid("key", key).build();
+ assertThat(session.execute(boundSelect).one().get(field.name, codec)).isEqualTo(value);
+ }
+
+ @Test
+ public void enum_names_of() {
+ insertAndRead(
+ TableField.cql_text, TestEnum.value1, ExtraTypeCodecs.enumNamesOf(TestEnum.class));
+ }
+
+ @Test
+ public void enum_ordinals_of() {
+ insertAndRead(
+ TableField.cql_int, TestEnum.value1, ExtraTypeCodecs.enumOrdinalsOf(TestEnum.class));
+ }
+
+ // Also requires -Dccm.branch=vsearch and the ability to build that branch locally
+ @BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "5.0.0")
+ @Test
+ public void float_to_vector_array() {
+ // @BackRequirement on test methods that use @ClassRule to configure CcmRule require @Rule
+ // BackendRequirementRule included with fix JAVA-3069. Until then we will ignore this test with
+ // an assume.
+ Assume.assumeTrue(
+ "Requires Cassandra 5.0 or greater",
+ CCM_RULE.getCassandraVersion().compareTo(Version.parse("5.0")) >= 0);
+ insertAndRead(
+ TableField.cql_vector,
+ new float[] {1.1f, 0f, Float.NaN},
+ ExtraTypeCodecs.floatVectorToArray(3));
+ }
+
+ @Test
+ public void json_java_class() {
+ insertAndRead(
+ TableField.cql_text,
+ new TestJsonAnnotatedPojo("example", Arrays.asList(1, 2, 3)),
+ ExtraTypeCodecs.json(TestJsonAnnotatedPojo.class));
+ }
+
+ @Test
+ public void json_java_class_and_object_mapper() {
+ insertAndRead(
+ TableField.cql_text,
+ TestPojo.create(1, "abc", "def"),
+ ExtraTypeCodecs.json(TestPojo.class, new ObjectMapper()));
+ }
+
+ @Test
+ public void list_to_array_of() {
+ insertAndRead(
+ TableField.cql_list_of_text,
+ new String[] {"hello", "kitty"},
+ ExtraTypeCodecs.listToArrayOf(TypeCodecs.TEXT));
+ }
+
+ @Test
+ public void local_timestamp_at() {
+ ZoneId systemZoneId = ZoneId.systemDefault();
+ insertAndRead(
+ TableField.cql_timestamp,
+ LocalDateTime.now(systemZoneId).truncatedTo(ChronoUnit.MILLIS),
+ ExtraTypeCodecs.localTimestampAt(systemZoneId));
+ }
+
+ @Test
+ public void optional_of() {
+ insertAndRead(
+ TableField.cql_boolean, Optional.empty(), ExtraTypeCodecs.optionalOf(TypeCodecs.BOOLEAN));
+ insertAndRead(
+ TableField.cql_boolean, Optional.of(true), ExtraTypeCodecs.optionalOf(TypeCodecs.BOOLEAN));
+ }
+
+ @Test
+ public void timestamp_at() {
+ ZoneId systemZoneId = ZoneId.systemDefault();
+ insertAndRead(
+ TableField.cql_timestamp,
+ Instant.now().truncatedTo(ChronoUnit.MILLIS),
+ ExtraTypeCodecs.timestampAt(systemZoneId));
+ }
+
+ @Test
+ public void timestamp_millis_at() {
+ ZoneId systemZoneId = ZoneId.systemDefault();
+ insertAndRead(
+ TableField.cql_timestamp,
+ Instant.now().toEpochMilli(),
+ ExtraTypeCodecs.timestampMillisAt(systemZoneId));
+ }
+
+ @Test
+ public void zoned_timestamp_at() {
+ ZoneId systemZoneId = ZoneId.systemDefault();
+ insertAndRead(
+ TableField.cql_timestamp,
+ ZonedDateTime.now(systemZoneId).truncatedTo(ChronoUnit.MILLIS),
+ ExtraTypeCodecs.zonedTimestampAt(systemZoneId));
+ }
+
+ private enum TestEnum {
+ value1,
+ value2,
+ value3,
+ }
+
+ // Public for JSON serialization
+ public static final class TestJsonAnnotatedPojo {
+ public final String info;
+ public final List values;
+
+ @JsonCreator
+ public TestJsonAnnotatedPojo(
+ @JsonProperty("info") String info, @JsonProperty("values") List values) {
+ this.info = info;
+ this.values = values;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ TestJsonAnnotatedPojo testJsonAnnotatedPojo = (TestJsonAnnotatedPojo) o;
+ return Objects.equals(info, testJsonAnnotatedPojo.info)
+ && Objects.equals(values, testJsonAnnotatedPojo.values);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(info, values);
+ }
+ }
+
+ public static final class TestPojo {
+ public int id;
+ public String[] messages;
+
+ public static TestPojo create(int id, String... messages) {
+ TestPojo obj = new TestPojo();
+ obj.id = id;
+ obj.messages = messages;
+ return obj;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ TestPojo testPojo = (TestPojo) o;
+ return id == testPojo.id && Arrays.equals(messages, testPojo.messages);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = Objects.hash(id);
+ result = 31 * result + Arrays.hashCode(messages);
+ return result;
+ }
+ }
+}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/registry/CodecRegistryIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/registry/CodecRegistryIT.java
index 9988e0c18e0..74472e8bab9 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/registry/CodecRegistryIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/type/codec/registry/CodecRegistryIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -36,6 +38,7 @@
import com.datastax.oss.driver.api.core.type.codec.registry.MutableCodecRegistry;
import com.datastax.oss.driver.api.core.type.reflect.GenericType;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -76,35 +79,39 @@ public class CodecRegistryIT {
@BeforeClass
public static void createSchema() {
- // table with simple primary key, single cell.
- SESSION_RULE
- .session()
- .execute(
- SimpleStatement.builder("CREATE TABLE IF NOT EXISTS test (k text primary key, v int)")
- .setExecutionProfile(SESSION_RULE.slowProfile())
- .build());
- // table with map value
- SESSION_RULE
- .session()
- .execute(
- SimpleStatement.builder(
- "CREATE TABLE IF NOT EXISTS test2 (k0 text, k1 int, v map, primary key (k0, k1))")
- .setExecutionProfile(SESSION_RULE.slowProfile())
- .build());
- // table with UDT
- SESSION_RULE
- .session()
- .execute(
- SimpleStatement.builder("CREATE TYPE IF NOT EXISTS coordinates (x int, y int)")
- .setExecutionProfile(SESSION_RULE.slowProfile())
- .build());
- SESSION_RULE
- .session()
- .execute(
- SimpleStatement.builder(
- "CREATE TABLE IF NOT EXISTS test3 (k0 text, k1 int, v map>, primary key (k0, k1))")
- .setExecutionProfile(SESSION_RULE.slowProfile())
- .build());
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ // table with simple primary key, single cell.
+ SESSION_RULE
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test (k text primary key, v int)")
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ // table with map value
+ SESSION_RULE
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test2 (k0 text, k1 int, v map, primary key (k0, k1))")
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ // table with UDT
+ SESSION_RULE
+ .session()
+ .execute(
+ SimpleStatement.builder("CREATE TYPE IF NOT EXISTS coordinates (x int, y int)")
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ SESSION_RULE
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE IF NOT EXISTS test3 (k0 text, k1 int, v map>, primary key (k0, k1))")
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ });
}
// A simple codec that allows float values to be used for cassandra int column type.
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSession.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSession.java
index 48f74fcb8df..082858803af 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSession.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSession.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionBuilder.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionBuilder.java
index 6356b632f3e..fe20d0fdc8a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionBuilder.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionBuilder.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionUtils.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionUtils.java
index c379d313572..afa8439c487 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionUtils.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/api/GuavaSessionUtils.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/DefaultGuavaSession.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/DefaultGuavaSession.java
index a63da30d69b..7418526520b 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/DefaultGuavaSession.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/DefaultGuavaSession.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaDriverContext.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaDriverContext.java
index 5a8b44be739..692ad951187 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaDriverContext.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaDriverContext.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,6 +28,7 @@
import com.datastax.oss.driver.internal.core.cql.CqlRequestAsyncProcessor;
import com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor;
import com.datastax.oss.driver.internal.core.session.RequestProcessorRegistry;
+import java.util.Optional;
/**
* A Custom {@link DefaultDriverContext} that overrides {@link #getRequestProcessorRegistry()} to
@@ -44,7 +47,8 @@ public RequestProcessorRegistry buildRequestProcessorRegistry() {
// use GuavaRequestAsyncProcessor to return ListenableFutures in async methods.
CqlRequestAsyncProcessor cqlRequestAsyncProcessor = new CqlRequestAsyncProcessor();
- CqlPrepareAsyncProcessor cqlPrepareAsyncProcessor = new CqlPrepareAsyncProcessor();
+ CqlPrepareAsyncProcessor cqlPrepareAsyncProcessor =
+ new CqlPrepareAsyncProcessor(Optional.of(this));
CqlRequestSyncProcessor cqlRequestSyncProcessor =
new CqlRequestSyncProcessor(cqlRequestAsyncProcessor);
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaRequestAsyncProcessor.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaRequestAsyncProcessor.java
index 4f9a6484731..20cb60323e9 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaRequestAsyncProcessor.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/GuavaRequestAsyncProcessor.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequest.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequest.java
index 7ab96a5a8b0..ef582cce1b9 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequest.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequest.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequestProcessor.java b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequestProcessor.java
index 6895e359e1d..1fcfb9dd3b2 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequestProcessor.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/example/guava/internal/KeyRequestProcessor.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/type/codec/UdtCodecIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/type/codec/UdtCodecIT.java
new file mode 100644
index 00000000000..804a078bbe0
--- /dev/null
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/type/codec/UdtCodecIT.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.internal.core.type.codec;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import com.datastax.oss.driver.api.core.CqlSession;
+import com.datastax.oss.driver.api.core.cql.Row;
+import com.datastax.oss.driver.api.core.data.UdtValue;
+import com.datastax.oss.driver.api.core.type.UserDefinedType;
+import com.datastax.oss.driver.api.core.type.codec.TypeCodec;
+import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.session.SessionRule;
+import com.datastax.oss.driver.categories.ParallelizableTests;
+import java.util.Objects;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
+
+@Category(ParallelizableTests.class)
+public class UdtCodecIT {
+
+ private CcmRule ccmRule = CcmRule.getInstance();
+
+ private SessionRule sessionRule = SessionRule.builder(ccmRule).build();
+
+ @Rule public TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
+
+ @Test
+ public void should_decoding_udt_be_backward_compatible() {
+ CqlSession session = sessionRule.session();
+ session.execute("CREATE TYPE test_type_1 (a text, b int)");
+ session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen)");
+ // insert a row using version 1 of the UDT schema
+ session.execute("INSERT INTO test_table_1(e, f) VALUES(1, {a: 'a', b: 1})");
+ UserDefinedType udt =
+ session
+ .getMetadata()
+ .getKeyspace(sessionRule.keyspace())
+ .flatMap(ks -> ks.getUserDefinedType("test_type_1"))
+ .orElseThrow(IllegalStateException::new);
+ TypeCodec> oldCodec = session.getContext().getCodecRegistry().codecFor(udt);
+ // update UDT schema
+ session.execute("ALTER TYPE test_type_1 add i text");
+ // insert a row using version 2 of the UDT schema
+ session.execute("INSERT INTO test_table_1(e, f) VALUES(2, {a: 'b', b: 2, i: 'b'})");
+ Row row =
+ Objects.requireNonNull(session.execute("SELECT f FROM test_table_1 WHERE e = ?", 2).one());
+ // Try to read new row with old codec. Using row.getUdtValue() would not cause any issues,
+ // because new codec will be automatically registered (using all 3 attributes).
+ // If application leverages generic row.get(String, Codec) method, data reading with old codec
+ // should
+ // be backward-compatible.
+ UdtValue value = Objects.requireNonNull((UdtValue) row.get("f", oldCodec));
+ assertThat(value.getString("a")).isEqualTo("b");
+ assertThat(value.getInt("b")).isEqualTo(2);
+ assertThatThrownBy(() -> value.getString("i")).hasMessage("i is not a field in this UDT");
+ }
+}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationCcmIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationCcmIT.java
index e771b28116a..e0f058b00d0 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationCcmIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationCcmIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,8 +28,9 @@
import com.datastax.oss.driver.api.core.config.DriverExecutionProfile;
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
-import com.datastax.oss.driver.api.testinfra.DseRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.IsolatedTests;
import java.time.Duration;
@@ -51,8 +54,9 @@
* {@link DriverBlockHoundIntegration} are being applied, and especially when continuous paging is
* used.
*/
-@DseRequirement(
- min = "5.1.0",
+@BackendRequirement(
+ type = BackendType.DSE,
+ minInclusive = "5.1.0",
description = "Continuous paging is only available from 5.1.0 onwards")
@Category(IsolatedTests.class)
public class DriverBlockHoundIntegrationCcmIT extends ContinuousPagingITBase {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationIT.java
index 8c6b197bbd5..278e3081ea1 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/internal/core/util/concurrent/DriverBlockHoundIntegrationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ComputedIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ComputedIT.java
index 2ca7ecef743..5ef66f15bfb 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ComputedIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ComputedIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/CustomResultTypeIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/CustomResultTypeIT.java
index 9d12b26d5ae..c218dcfcc86 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/CustomResultTypeIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/CustomResultTypeIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java
index 55f7aff9b62..30a808e87a9 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,7 +17,6 @@
*/
package com.datastax.oss.driver.mapper;
-import static com.datastax.oss.driver.api.mapper.MapperBuilder.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
@@ -25,6 +26,7 @@
import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.core.servererrors.InvalidQueryException;
+import com.datastax.oss.driver.api.mapper.MapperBuilder;
import com.datastax.oss.driver.api.mapper.MapperException;
import com.datastax.oss.driver.api.mapper.annotations.Dao;
import com.datastax.oss.driver.api.mapper.annotations.DaoFactory;
@@ -122,7 +124,7 @@ public void should_fail_to_insert_if_default_ks_and_dao_ks_not_provided() {
() -> {
InventoryMapperKsNotSet mapper =
new DefaultKeyspaceIT_InventoryMapperKsNotSetBuilder(SESSION_RULE.session())
- .withCustomState(SCHEMA_VALIDATION_ENABLED_SETTING, false)
+ .withCustomState(MapperBuilder.SCHEMA_VALIDATION_ENABLED_SETTING, false)
.build();
mapper.productDaoDefaultKsNotSet();
})
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultNullSavingStrategyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultNullSavingStrategyIT.java
index cbcf0cc4f5e..fc88b5bbf7f 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultNullSavingStrategyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultNullSavingStrategyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,8 +37,9 @@
import com.datastax.oss.driver.api.mapper.annotations.SetEntity;
import com.datastax.oss.driver.api.mapper.annotations.Update;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import java.util.function.BiConsumer;
@@ -53,7 +56,10 @@
* DefaultNullSavingStrategy} annotation.
*/
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "2.2", description = "support for unset values")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.2",
+ description = "support for unset values")
public class DefaultNullSavingStrategyIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteIT.java
index 18ff14cee43..03e3597501c 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -36,10 +38,10 @@
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
-import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
-import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@@ -48,17 +50,17 @@
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
-import org.junit.experimental.categories.Category;
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@Category(ParallelizableTests.class)
-@CassandraRequirement(
- min = "3.0",
+// Do not run LWT tests in parallel because they may interfere. Tests operate on the same row.
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.0",
description = ">= in WHERE clause not supported in legacy versions")
public class DeleteIT extends InventoryITBase {
- private static final CcmRule CCM_RULE = CcmRule.getInstance();
+ private static CustomCcmRule CCM_RULE = CustomCcmRule.builder().build();
private static final SessionRule SESSION_RULE = SessionRule.builder(CCM_RULE).build();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteReactiveIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteReactiveIT.java
index f9af1f0074d..2eb898021ba 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteReactiveIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DeleteReactiveIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,6 +24,7 @@
import com.datastax.dse.driver.api.mapper.reactive.MappedReactiveResultSet;
import com.datastax.oss.driver.api.core.CqlIdentifier;
import com.datastax.oss.driver.api.core.CqlSession;
+import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
import com.datastax.oss.driver.api.mapper.annotations.Dao;
import com.datastax.oss.driver.api.mapper.annotations.DaoFactory;
@@ -32,28 +35,36 @@
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
-import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.CcmBridge;
+import com.datastax.oss.driver.api.testinfra.ccm.CustomCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
-import com.datastax.oss.driver.categories.ParallelizableTests;
import io.reactivex.Flowable;
import java.util.UUID;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
-import org.junit.experimental.categories.Category;
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
-@Category(ParallelizableTests.class)
+// Do not run LWT tests in parallel because they may interfere. Tests operate on the same row.
public class DeleteReactiveIT extends InventoryITBase {
- private static CcmRule ccmRule = CcmRule.getInstance();
+ private static CustomCcmRule ccmRule = configureCcm(CustomCcmRule.builder()).build();
private static SessionRule sessionRule = SessionRule.builder(ccmRule).build();
@ClassRule public static TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
+ private static CustomCcmRule.Builder configureCcm(CustomCcmRule.Builder builder) {
+ if (!CcmBridge.isDistributionOf(
+ BackendType.DSE, (dist, cass) -> cass.nextStable().compareTo(Version.V4_0_0) >= 0)) {
+ builder.withCassandraConfiguration("enable_sasi_indexes", true);
+ }
+ return builder;
+ }
+
private static DseProductDao dao;
@BeforeClass
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/EntityPolymorphismIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/EntityPolymorphismIT.java
index fadbee7816e..3e532e97c00 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/EntityPolymorphismIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/EntityPolymorphismIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -45,6 +47,7 @@
import com.datastax.oss.driver.api.mapper.annotations.Update;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
@@ -81,22 +84,27 @@ public class EntityPolymorphismIT {
@BeforeClass
public static void setup() {
CqlSession session = SESSION_RULE.session();
- for (String query :
- ImmutableList.of(
- "CREATE TYPE point2d (\"X\" int, \"Y\" int)",
- "CREATE TYPE point3d (\"X\" int, \"Y\" int, \"Z\" int)",
- "CREATE TABLE circles (circle_id uuid PRIMARY KEY, center2d frozen, radius "
- + "double, tags set)",
- "CREATE TABLE rectangles (rect_id uuid PRIMARY KEY, bottom_left frozen, top_right frozen, tags set)",
- "CREATE TABLE squares (square_id uuid PRIMARY KEY, bottom_left frozen, top_right frozen, tags set)",
- "CREATE TABLE spheres (sphere_id uuid PRIMARY KEY, center3d frozen, radius "
- + "double, tags set)",
- "CREATE TABLE devices (device_id uuid PRIMARY KEY, name text)",
- "CREATE TABLE tracked_devices (device_id uuid PRIMARY KEY, name text, location text)",
- "CREATE TABLE simple_devices (id uuid PRIMARY KEY, in_use boolean)")) {
- session.execute(
- SimpleStatement.builder(query).setExecutionProfile(SESSION_RULE.slowProfile()).build());
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ for (String query :
+ ImmutableList.of(
+ "CREATE TYPE point2d (\"X\" int, \"Y\" int)",
+ "CREATE TYPE point3d (\"X\" int, \"Y\" int, \"Z\" int)",
+ "CREATE TABLE circles (circle_id uuid PRIMARY KEY, center2d frozen, radius "
+ + "double, tags set)",
+ "CREATE TABLE rectangles (rect_id uuid PRIMARY KEY, bottom_left frozen, top_right frozen, tags set)",
+ "CREATE TABLE squares (square_id uuid PRIMARY KEY, bottom_left frozen, top_right frozen, tags set)",
+ "CREATE TABLE spheres (sphere_id uuid PRIMARY KEY, center3d frozen, radius "
+ + "double, tags set)",
+ "CREATE TABLE devices (device_id uuid PRIMARY KEY, name text)",
+ "CREATE TABLE tracked_devices (device_id uuid PRIMARY KEY, name text, location text)",
+ "CREATE TABLE simple_devices (id uuid PRIMARY KEY, in_use boolean)")) {
+ session.execute(
+ SimpleStatement.builder(query)
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ }
+ });
mapper = new EntityPolymorphismIT_TestMapperBuilder(session).build();
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/FluentEntityIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/FluentEntityIT.java
index d06c1401e0c..fa93e4e768b 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/FluentEntityIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/FluentEntityIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GetEntityIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GetEntityIT.java
index 643284fb225..d3f3eec93ae 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GetEntityIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GetEntityIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GuavaFutureProducerService.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GuavaFutureProducerService.java
index bebb2adeaa1..759b01a4e20 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GuavaFutureProducerService.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/GuavaFutureProducerService.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ImmutableEntityIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ImmutableEntityIT.java
index cfbb5b67e67..bdfe92a23f9 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ImmutableEntityIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ImmutableEntityIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -40,6 +42,7 @@
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import java.util.Objects;
@@ -68,10 +71,15 @@ public class ImmutableEntityIT extends InventoryITBase {
public static void setup() {
CqlSession session = SESSION_RULE.session();
- for (String query : createStatements(CCM_RULE)) {
- session.execute(
- SimpleStatement.builder(query).setExecutionProfile(SESSION_RULE.slowProfile()).build());
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ for (String query : createStatements(CCM_RULE)) {
+ session.execute(
+ SimpleStatement.builder(query)
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ }
+ });
UserDefinedType dimensions2d =
session
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementIT.java
index 1e1beeef8f7..16b6668ea56 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementWithNullsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementWithNullsIT.java
index 642bb9c17b9..9020a80afed 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementWithNullsIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/IncrementWithNullsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,8 +30,9 @@
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.mapper.IncrementIT.ProductRating;
@@ -42,7 +45,7 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "2.2")
+@BackendRequirement(type = BackendType.CASSANDRA, minInclusive = "2.2")
public class IncrementWithNullsIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertIT.java
index a89db6e8bfc..5c7530bf69e 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertReactiveIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertReactiveIT.java
index e7a6b0175fc..e9b9879fcb8 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertReactiveIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InsertReactiveIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InventoryITBase.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InventoryITBase.java
index 3a0435c5da1..1bd899e4541 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InventoryITBase.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/InventoryITBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,11 +22,11 @@
import com.datastax.oss.driver.api.mapper.annotations.ClusteringColumn;
import com.datastax.oss.driver.api.mapper.annotations.Entity;
import com.datastax.oss.driver.api.mapper.annotations.PartitionKey;
-import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.BaseCcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
import java.util.List;
import java.util.Objects;
-import java.util.Optional;
import java.util.UUID;
/** Factors common code for mapper tests that rely on a simple inventory model. */
@@ -56,7 +58,11 @@ public abstract class InventoryITBase {
protected static ProductSale MP3_DOWNLOAD_SALE_1 =
new ProductSale(MP3_DOWNLOAD.getId(), DATE_3, 7, Uuids.startOf(915192000), 0.99, 12);
- protected static List createStatements(CcmRule ccmRule) {
+ protected static List createStatements(BaseCcmRule ccmRule) {
+ return createStatements(ccmRule, false);
+ }
+
+ protected static List createStatements(BaseCcmRule ccmRule, boolean requiresSasiIndex) {
ImmutableList.Builder builder =
ImmutableList.builder()
.add(
@@ -69,7 +75,7 @@ protected static List createStatements(CcmRule ccmRule) {
"CREATE TABLE product_sale(id uuid, day text, ts uuid, customer_id int, price "
+ "double, count int, PRIMARY KEY ((id, day), customer_id, ts))");
- if (supportsSASI(ccmRule) && !isSasiBroken(ccmRule)) {
+ if (requiresSasiIndex && supportsSASI(ccmRule) && !isSasiBroken(ccmRule)) {
builder.add(
"CREATE CUSTOM INDEX product_description ON product(description) "
+ "USING 'org.apache.cassandra.index.sasi.SASIIndex' "
@@ -87,16 +93,17 @@ protected static List createStatements(CcmRule ccmRule) {
return builder.build();
}
- private static final Version MINIMUM_SASI_VERSION = Version.parse("3.4.0");
- private static final Version BROKEN_SASI_VERSION = Version.parse("6.8.0");
+ private static final Version MINIMUM_SASI_VERSION =
+ Objects.requireNonNull(Version.parse("3.4.0"));
+ private static final Version BROKEN_SASI_VERSION = Objects.requireNonNull(Version.parse("6.8.0"));
- protected static boolean isSasiBroken(CcmRule ccmRule) {
- Optional dseVersion = ccmRule.getDseVersion();
+ protected static boolean isSasiBroken(BaseCcmRule ccmRule) {
// creating SASI indexes is broken in DSE 6.8.0
- return dseVersion.isPresent() && dseVersion.get().compareTo(BROKEN_SASI_VERSION) == 0;
+ return ccmRule.isDistributionOf(
+ BackendType.DSE, (dist, cass) -> dist.compareTo(BROKEN_SASI_VERSION) == 0);
}
- protected static boolean supportsSASI(CcmRule ccmRule) {
+ protected static boolean supportsSASI(BaseCcmRule ccmRule) {
return ccmRule.getCassandraVersion().compareTo(MINIMUM_SASI_VERSION) >= 0;
}
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NamingStrategyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NamingStrategyIT.java
index 038f3e11761..974e4bad7c3 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NamingStrategyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NamingStrategyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NestedUdtIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NestedUdtIT.java
index b7b8742e53c..d61b6f6e628 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NestedUdtIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NestedUdtIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -38,8 +40,10 @@
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.annotations.SetEntity;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
@@ -61,7 +65,10 @@
/** Tests that entities with UDTs nested at various levels are properly mapped. */
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "2.2", description = "support for unset values")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.2",
+ description = "support for unset values")
public class NestedUdtIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
@@ -113,27 +120,32 @@ public class NestedUdtIT {
public static void setup() {
CqlSession session = SESSION_RULE.session();
- for (String query :
- ImmutableList.of(
- "CREATE TYPE type1(s1 text, s2 text)",
- "CREATE TYPE type2(i1 int, i2 int)",
- "CREATE TYPE type1_partial(s1 text)",
- "CREATE TYPE type2_partial(i1 int)",
- "CREATE TABLE container(id uuid PRIMARY KEY, "
- + "list frozen>, "
- + "map1 frozen>>, "
- + "map2 frozen>>>,"
- + "map3 frozen>>>"
- + ")",
- "CREATE TABLE container_partial(id uuid PRIMARY KEY, "
- + "list frozen>, "
- + "map1 frozen>>, "
- + "map2 frozen>>>,"
- + "map3 frozen>>>"
- + ")")) {
- session.execute(
- SimpleStatement.builder(query).setExecutionProfile(SESSION_RULE.slowProfile()).build());
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ for (String query :
+ ImmutableList.of(
+ "CREATE TYPE type1(s1 text, s2 text)",
+ "CREATE TYPE type2(i1 int, i2 int)",
+ "CREATE TYPE type1_partial(s1 text)",
+ "CREATE TYPE type2_partial(i1 int)",
+ "CREATE TABLE container(id uuid PRIMARY KEY, "
+ + "list frozen>, "
+ + "map1 frozen>>, "
+ + "map2 frozen>>>,"
+ + "map3 frozen>>>"
+ + ")",
+ "CREATE TABLE container_partial(id uuid PRIMARY KEY, "
+ + "list frozen>, "
+ + "map1 frozen>>, "
+ + "map2 frozen>>>,"
+ + "map3 frozen>>>"
+ + ")")) {
+ session.execute(
+ SimpleStatement.builder(query)
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ }
+ });
UserDefinedType type1Partial =
session
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NullSavingStrategyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NullSavingStrategyIT.java
index 32f71041b19..ea96c12e57b 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NullSavingStrategyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/NullSavingStrategyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -36,9 +38,11 @@
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
+import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
import java.util.Objects;
import java.util.UUID;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
@@ -51,13 +55,24 @@ public class NullSavingStrategyIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
- private static final SessionRule SESSION_RULE =
- SessionRule.builder(CCM_RULE)
- .withConfigLoader(
- DriverConfigLoader.programmaticBuilder()
- .withString(DefaultDriverOption.PROTOCOL_VERSION, "V3")
- .build())
- .build();
+ private static final SessionRule SESSION_RULE = SessionRule.builder(CCM_RULE).build();
+
+ // JAVA-3076: V3 protocol calls that could trigger cassandra to issue client warnings appear to be
+ // inherently unstable when used at the same time as V4+ protocol clients (common since this is
+ // part of the parallelizable test suite).
+ //
+ // For this test we'll use latest protocol version for SessionRule set-up, which creates the
+ // keyspace and could potentially result in warning about too many keyspaces, and then create a
+ // new client for the tests to use, which they access via the static InventoryMapper instance
+ // `mapper`.
+ //
+ // This additional client is created in the @BeforeClass method #setup() and guaranteed to be
+ // closed in @AfterClass method #teardown().
+ //
+ // Note: The standard junit runner executes rules before class/test setup so the order of
+ // execution will be CcmRule#before > SessionRule#before > NullSavingStrategyIT#setup, meaning
+ // CCM_RULE/SESSION_RULE should be fully initialized by the time #setup() is invoked.
+ private static CqlSession v3Session;
@ClassRule
public static final TestRule CHAIN = RuleChain.outerRule(CCM_RULE).around(SESSION_RULE);
@@ -66,14 +81,34 @@ public class NullSavingStrategyIT {
@BeforeClass
public static void setup() {
- CqlSession session = SESSION_RULE.session();
- session.execute(
- SimpleStatement.builder(
- "CREATE TABLE product_simple(id uuid PRIMARY KEY, description text)")
- .setExecutionProfile(SESSION_RULE.slowProfile())
- .build());
-
- mapper = new NullSavingStrategyIT_InventoryMapperBuilder(session).build();
+ // setup table for use in tests, this can use the default session
+ SESSION_RULE
+ .session()
+ .execute(
+ SimpleStatement.builder(
+ "CREATE TABLE product_simple(id uuid PRIMARY KEY, description text)")
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+
+ // Create V3 protocol session for use in tests, will be closed in #teardown()
+ v3Session =
+ SessionUtils.newSession(
+ CCM_RULE,
+ SESSION_RULE.keyspace(),
+ DriverConfigLoader.programmaticBuilder()
+ .withString(DefaultDriverOption.PROTOCOL_VERSION, "V3")
+ .build());
+
+ // Hand V3 session to InventoryMapper which the tests will use to perform db calls
+ mapper = new NullSavingStrategyIT_InventoryMapperBuilder(v3Session).build();
+ }
+
+ @AfterClass
+ public static void teardown() {
+ // Close V3 session (SESSION_RULE will be closed separately by @ClassRule handling)
+ if (v3Session != null) {
+ v3Session.close();
+ }
}
@Test
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/PrimitivesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/PrimitivesIT.java
index 9cc4004690d..d63e3834188 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/PrimitivesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/PrimitivesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -29,8 +31,9 @@
import com.datastax.oss.driver.api.mapper.annotations.PartitionKey;
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import java.util.Objects;
@@ -42,7 +45,10 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "2.2", description = "smallint is a reserved keyword in 2.1")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.2",
+ description = "smallint is a reserved keyword in 2.1")
public class PrimitivesIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ProfileIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ProfileIT.java
index eac0410759e..3ed2a48cced 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ProfileIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/ProfileIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java
index f3ad91c1c30..9391c0363f8 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryProviderIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryProviderIT.java
index 3fc54d2826d..4bfda4fdfdb 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryProviderIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryProviderIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReactiveIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReactiveIT.java
index 8368e309a5b..d04ab5150ec 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReactiveIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReactiveIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReturnTypesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReturnTypesIT.java
index 990b38ac2e1..c6e90912206 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReturnTypesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReturnTypesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SchemaValidationIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SchemaValidationIT.java
index 9abaa714996..5bf6fc2d27a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SchemaValidationIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SchemaValidationIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -43,8 +45,9 @@
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.annotations.Update;
import com.datastax.oss.driver.api.mapper.entity.EntityHelper;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.util.LoggerTest;
@@ -61,7 +64,10 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "3.4", description = "Creates a SASI index")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.4",
+ description = "Creates a SASI index")
public class SchemaValidationIT extends InventoryITBase {
private static CcmRule ccm = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectCustomWhereClauseIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectCustomWhereClauseIT.java
index 3afcc03e451..1f1b92b8623 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectCustomWhereClauseIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectCustomWhereClauseIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -32,8 +34,10 @@
import com.datastax.oss.driver.api.mapper.annotations.Insert;
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
import com.datastax.oss.driver.api.mapper.annotations.Select;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures;
@@ -47,7 +51,10 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "3.4", description = "Creates a SASI index")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.4",
+ description = "Creates a SASI index")
public class SelectCustomWhereClauseIT extends InventoryITBase {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
@@ -66,10 +73,15 @@ public static void setup() {
CqlSession session = SESSION_RULE.session();
- for (String query : createStatements(CCM_RULE)) {
- session.execute(
- SimpleStatement.builder(query).setExecutionProfile(SESSION_RULE.slowProfile()).build());
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ for (String query : createStatements(CCM_RULE, true)) {
+ session.execute(
+ SimpleStatement.builder(query)
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ }
+ });
InventoryMapper inventoryMapper =
new SelectCustomWhereClauseIT_InventoryMapperBuilder(session).build();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectIT.java
index ccd98fad15a..fcb78c3075d 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectOtherClausesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectOtherClausesIT.java
index 5b479a13f55..3eb40fd8520 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectOtherClausesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectOtherClausesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -33,8 +35,9 @@
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
import com.datastax.oss.driver.api.mapper.annotations.PartitionKey;
import com.datastax.oss.driver.api.mapper.annotations.Select;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.shaded.guava.common.collect.ImmutableList;
@@ -49,7 +52,10 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "3.6", description = "Uses PER PARTITION LIMIT")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.6",
+ description = "Uses PER PARTITION LIMIT")
public class SelectOtherClausesIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectReactiveIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectReactiveIT.java
index 09e107f98f3..79e4d2b33ea 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectReactiveIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SelectReactiveIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -32,6 +34,7 @@
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import io.reactivex.Flowable;
@@ -59,10 +62,15 @@ public class SelectReactiveIT extends InventoryITBase {
public static void setup() {
CqlSession session = sessionRule.session();
- for (String query : createStatements(ccmRule)) {
- session.execute(
- SimpleStatement.builder(query).setExecutionProfile(sessionRule.slowProfile()).build());
- }
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ for (String query : createStatements(ccmRule)) {
+ session.execute(
+ SimpleStatement.builder(query)
+ .setExecutionProfile(sessionRule.slowProfile())
+ .build());
+ }
+ });
DseInventoryMapper inventoryMapper =
new SelectReactiveIT_DseInventoryMapperBuilder(session).build();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SetEntityIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SetEntityIT.java
index f6fe6c6e25d..3bf6557347a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SetEntityIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/SetEntityIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/StatementAttributesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/StatementAttributesIT.java
index 6f957c8a36c..c5099baaf35 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/StatementAttributesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/StatementAttributesIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/TransientIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/TransientIT.java
index 0200a463da3..0fab03569d1 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/TransientIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/TransientIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UdtKeyIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UdtKeyIT.java
index bcb981e0ee6..c17cd290451 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UdtKeyIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UdtKeyIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateCustomIfClauseIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateCustomIfClauseIT.java
index 53773a20ee1..ebdd2dfd40a 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateCustomIfClauseIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateCustomIfClauseIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,8 +32,9 @@
import com.datastax.oss.driver.api.mapper.annotations.Mapper;
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.annotations.Update;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures;
@@ -46,7 +49,10 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "3.11.0", description = "UDT fields in IF clause")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.11.0",
+ description = "UDT fields in IF clause")
public class UpdateCustomIfClauseIT extends InventoryITBase {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateIT.java
index b531eaa6bd8..3fac733c900 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,6 +37,7 @@
import com.datastax.oss.driver.api.mapper.annotations.Update;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.ccm.SchemaChangeSynchronizer;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures;
@@ -63,14 +66,18 @@ public class UpdateIT extends InventoryITBase {
@BeforeClass
public static void setup() {
CqlSession session = SESSION_RULE.session();
-
- for (String query : createStatements(CCM_RULE)) {
- session.execute(
- SimpleStatement.builder(query).setExecutionProfile(SESSION_RULE.slowProfile()).build());
- }
- session.execute(
- SimpleStatement.newInstance("CREATE TABLE only_p_k(id uuid PRIMARY KEY)")
- .setExecutionProfile(SESSION_RULE.slowProfile()));
+ SchemaChangeSynchronizer.withLock(
+ () -> {
+ for (String query : createStatements(CCM_RULE)) {
+ session.execute(
+ SimpleStatement.builder(query)
+ .setExecutionProfile(SESSION_RULE.slowProfile())
+ .build());
+ }
+ session.execute(
+ SimpleStatement.newInstance("CREATE TABLE only_p_k(id uuid PRIMARY KEY)")
+ .setExecutionProfile(SESSION_RULE.slowProfile()));
+ });
inventoryMapper = new UpdateIT_InventoryMapperBuilder(session).build();
dao = inventoryMapper.productDao(SESSION_RULE.keyspace());
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateNamingIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateNamingIT.java
index 740ef6c53de..c1b15b2cbca 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateNamingIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateNamingIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateReactiveIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateReactiveIT.java
index 6eb2f83793c..fa171441b50 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateReactiveIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/UpdateReactiveIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,8 +33,9 @@
import com.datastax.oss.driver.api.mapper.annotations.Select;
import com.datastax.oss.driver.api.mapper.annotations.Update;
import com.datastax.oss.driver.api.mapper.entity.saving.NullSavingStrategy;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.categories.ParallelizableTests;
import io.reactivex.Flowable;
@@ -47,8 +50,9 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(
- min = "3.6",
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.6",
description = "Uses UDT fields in IF conditions (CASSANDRA-7423)")
public class UpdateReactiveIT extends InventoryITBase {
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/metrics/micrometer/MicrometerMetricsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/metrics/micrometer/MicrometerMetricsIT.java
index 8c546c239cd..c38df1e2026 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/metrics/micrometer/MicrometerMetricsIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/metrics/micrometer/MicrometerMetricsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -184,6 +186,12 @@ protected void assertNodeMetricsNotEvicted(CqlSession session, Node node) {
}
}
+ @Override
+ protected void assertMetricsNotPresent(Object registry) {
+ MeterRegistry micrometerRegistry = (MeterRegistry) registry;
+ assertThat(micrometerRegistry.getMeters()).isEmpty();
+ }
+
@Override
protected void assertNodeMetricsEvicted(CqlSession session, Node node) {
InternalDriverContext context = (InternalDriverContext) session.getContext();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/metrics/microprofile/MicroProfileMetricsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/metrics/microprofile/MicroProfileMetricsIT.java
index 13d28936ad1..aa04c058a49 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/metrics/microprofile/MicroProfileMetricsIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/metrics/microprofile/MicroProfileMetricsIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -186,6 +188,12 @@ protected void assertNodeMetricsNotEvicted(CqlSession session, Node node) {
}
}
+ @Override
+ protected void assertMetricsNotPresent(Object registry) {
+ MetricRegistry metricRegistry = (MetricRegistry) registry;
+ assertThat(metricRegistry.getMetrics()).isEmpty();
+ }
+
@Override
protected void assertNodeMetricsEvicted(CqlSession session, Node node) {
InternalDriverContext context = (InternalDriverContext) session.getContext();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/JsonInsertIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/JsonInsertIT.java
index 9b6ed735d40..4df5c7a62bd 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/JsonInsertIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/JsonInsertIT.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,8 +32,9 @@
import com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException;
import com.datastax.oss.driver.api.core.type.codec.ExtraTypeCodecs;
import com.datastax.oss.driver.api.core.type.codec.TypeCodec;
-import com.datastax.oss.driver.api.testinfra.CassandraRequirement;
import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
import com.datastax.oss.driver.api.testinfra.session.SessionRule;
import com.datastax.oss.driver.api.testinfra.session.SessionUtils;
import com.datastax.oss.driver.categories.ParallelizableTests;
@@ -49,7 +52,10 @@
import org.junit.rules.TestRule;
@Category(ParallelizableTests.class)
-@CassandraRequirement(min = "2.2", description = "JSON support in Cassandra was added in 2.2")
+@BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "2.2",
+ description = "JSON support in Cassandra was added in 2.2")
public class JsonInsertIT {
private static final CcmRule CCM_RULE = CcmRule.getInstance();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/RelationOptionsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/RelationOptionsIT.java
new file mode 100644
index 00000000000..fc571ccf44d
--- /dev/null
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/querybuilder/RelationOptionsIT.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.datastax.oss.driver.querybuilder;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.datastax.oss.driver.api.core.CqlSession;
+import com.datastax.oss.driver.api.core.metadata.schema.KeyspaceMetadata;
+import com.datastax.oss.driver.api.core.type.DataTypes;
+import com.datastax.oss.driver.api.querybuilder.SchemaBuilder;
+import com.datastax.oss.driver.api.testinfra.ccm.CcmRule;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendRequirement;
+import com.datastax.oss.driver.api.testinfra.requirement.BackendType;
+import com.datastax.oss.driver.api.testinfra.session.SessionRule;
+import com.datastax.oss.driver.categories.ParallelizableTests;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestName;
+import org.junit.rules.TestRule;
+
+@Category(ParallelizableTests.class)
+public class RelationOptionsIT {
+
+ private CcmRule ccmRule = CcmRule.getInstance();
+
+ private SessionRule sessionRule = SessionRule.builder(ccmRule).build();
+
+ @Rule public TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
+
+ @Rule public TestName name = new TestName();
+
+ @Test
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.0",
+ description = "CRC check chance was moved to top level table in Cassandra 3.0")
+ public void should_create_table_with_crc_check_chance() {
+ sessionRule
+ .session()
+ .execute(
+ SchemaBuilder.createTable(name.getMethodName())
+ .withPartitionKey("id", DataTypes.INT)
+ .withColumn("name", DataTypes.TEXT)
+ .withColumn("age", DataTypes.INT)
+ .withCRCCheckChance(0.8)
+ .build());
+ KeyspaceMetadata keyspaceMetadata =
+ sessionRule
+ .session()
+ .getMetadata()
+ .getKeyspace(sessionRule.keyspace())
+ .orElseThrow(AssertionError::new);
+ String describeOutput = keyspaceMetadata.describeWithChildren(true).trim();
+
+ assertThat(describeOutput).contains("crc_check_chance = 0.8");
+ }
+
+ @Test
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "5.0",
+ description = "chunk_length_kb was renamed to chunk_length_in_kb in Cassandra 5.0")
+ public void should_create_table_with_chunk_length_in_kb() {
+ sessionRule
+ .session()
+ .execute(
+ SchemaBuilder.createTable(name.getMethodName())
+ .withPartitionKey("id", DataTypes.INT)
+ .withColumn("name", DataTypes.TEXT)
+ .withColumn("age", DataTypes.INT)
+ .withLZ4Compression(4096)
+ .build());
+ KeyspaceMetadata keyspaceMetadata =
+ sessionRule
+ .session()
+ .getMetadata()
+ .getKeyspace(sessionRule.keyspace())
+ .orElseThrow(AssertionError::new);
+ String describeOutput = keyspaceMetadata.describeWithChildren(true).trim();
+
+ assertThat(describeOutput).contains("'class':'org.apache.cassandra.io.compress.LZ4Compressor'");
+ assertThat(describeOutput).contains("'chunk_length_in_kb':'4096'");
+ }
+
+ @Test
+ @BackendRequirement(
+ type = BackendType.CASSANDRA,
+ minInclusive = "3.0",
+ maxExclusive = "5.0",
+ description =
+ "Deprecated compression options should still work with Cassandra >= 3.0 & < 5.0")
+ public void should_create_table_with_deprecated_options() {
+ sessionRule
+ .session()
+ .execute(
+ SchemaBuilder.createTable(name.getMethodName())
+ .withPartitionKey("id", DataTypes.INT)
+ .withColumn("name", DataTypes.TEXT)
+ .withColumn("age", DataTypes.INT)
+ .withLZ4Compression(4096, 0.8)
+ .build());
+ KeyspaceMetadata keyspaceMetadata =
+ sessionRule
+ .session()
+ .getMetadata()
+ .getKeyspace(sessionRule.keyspace())
+ .orElseThrow(AssertionError::new);
+ String describeOutput = keyspaceMetadata.describeWithChildren(true).trim();
+
+ assertThat(describeOutput).contains("'class':'org.apache.cassandra.io.compress.LZ4Compressor'");
+ assertThat(describeOutput).contains("'chunk_length_in_kb':'4096'");
+ assertThat(describeOutput).contains("crc_check_chance = 0.8");
+ }
+}
diff --git a/integration-tests/src/test/resources/DescribeIT/dse/4.8.cql b/integration-tests/src/test/resources/DescribeIT/dse/4.8.cql
index 05408ba0924..ea6ca93bcbf 100644
--- a/integration-tests/src/test/resources/DescribeIT/dse/4.8.cql
+++ b/integration-tests/src/test/resources/DescribeIT/dse/4.8.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
@@ -63,4 +64,4 @@ CREATE TABLE ks_0.ztable (
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
- AND speculative_retry = '99.0PERCENTILE';
\ No newline at end of file
+ AND speculative_retry = '99.0PERCENTILE';
diff --git a/integration-tests/src/test/resources/DescribeIT/dse/5.0.cql b/integration-tests/src/test/resources/DescribeIT/dse/5.0.cql
index 25b42c58d68..2572df52e24 100644
--- a/integration-tests/src/test/resources/DescribeIT/dse/5.0.cql
+++ b/integration-tests/src/test/resources/DescribeIT/dse/5.0.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
@@ -185,4 +186,4 @@ CREATE AGGREGATE ks_0.mean(int)
SFUNC avgstate
STYPE tuple
FINALFUNC avgfinal
- INITCOND (0,0);
\ No newline at end of file
+ INITCOND (0,0);
diff --git a/integration-tests/src/test/resources/DescribeIT/dse/5.1.cql b/integration-tests/src/test/resources/DescribeIT/dse/5.1.cql
index 25b42c58d68..2572df52e24 100644
--- a/integration-tests/src/test/resources/DescribeIT/dse/5.1.cql
+++ b/integration-tests/src/test/resources/DescribeIT/dse/5.1.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
@@ -185,4 +186,4 @@ CREATE AGGREGATE ks_0.mean(int)
SFUNC avgstate
STYPE tuple
FINALFUNC avgfinal
- INITCOND (0,0);
\ No newline at end of file
+ INITCOND (0,0);
diff --git a/integration-tests/src/test/resources/DescribeIT/dse/6.8.cql b/integration-tests/src/test/resources/DescribeIT/dse/6.8.cql
index 416c397ba97..bdeb4737748 100644
--- a/integration-tests/src/test/resources/DescribeIT/dse/6.8.cql
+++ b/integration-tests/src/test/resources/DescribeIT/dse/6.8.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
diff --git a/integration-tests/src/test/resources/DescribeIT/hcd/1.0.cql b/integration-tests/src/test/resources/DescribeIT/hcd/1.0.cql
new file mode 100644
index 00000000000..abc70728206
--- /dev/null
+++ b/integration-tests/src/test/resources/DescribeIT/hcd/1.0.cql
@@ -0,0 +1,186 @@
+
+CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
+
+CREATE TYPE ks_0.btype (
+ a text
+);
+
+CREATE TYPE ks_0.xtype (
+ d text
+);
+
+CREATE TYPE ks_0.ztype (
+ c text,
+ a int
+);
+
+CREATE TYPE ks_0.ctype (
+ z frozen,
+ x frozen
+);
+
+CREATE TYPE ks_0.atype (
+ c frozen
+);
+
+CREATE TABLE ks_0.cyclist_mv (
+ cid uuid,
+ age int,
+ birthday date,
+ country text,
+ name text,
+ PRIMARY KEY (cid)
+) WITH additional_write_policy = '99p'
+ AND bloom_filter_fp_chance = 0.01
+ AND caching = {'keys':'ALL','rows_per_partition':'NONE'}
+ AND comment = ''
+ AND compaction = {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'}
+ AND compression = {'chunk_length_in_kb':'64','class':'org.apache.cassandra.io.compress.LZ4Compressor'}
+ AND crc_check_chance = 1.0
+ AND default_time_to_live = 0
+ AND extensions = {}
+ AND gc_grace_seconds = 864000
+ AND max_index_interval = 2048
+ AND memtable_flush_period_in_ms = 0
+ AND min_index_interval = 128
+ AND read_repair = 'BLOCKING'
+ AND speculative_retry = '99p';
+
+CREATE INDEX cyclist_by_country ON ks_0.cyclist_mv (country);
+
+CREATE TABLE ks_0.rank_by_year_and_name (
+ race_year int,
+ race_name text,
+ rank int,
+ cyclist_name text,
+ PRIMARY KEY ((race_year, race_name), rank)
+) WITH CLUSTERING ORDER BY (rank DESC)
+ AND additional_write_policy = '99p'
+ AND bloom_filter_fp_chance = 0.01
+ AND caching = {'keys':'ALL','rows_per_partition':'NONE'}
+ AND comment = ''
+ AND compaction = {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'}
+ AND compression = {'chunk_length_in_kb':'64','class':'org.apache.cassandra.io.compress.LZ4Compressor'}
+ AND crc_check_chance = 1.0
+ AND default_time_to_live = 0
+ AND extensions = {}
+ AND gc_grace_seconds = 864000
+ AND max_index_interval = 2048
+ AND memtable_flush_period_in_ms = 0
+ AND min_index_interval = 128
+ AND read_repair = 'BLOCKING'
+ AND speculative_retry = '99p';
+
+CREATE INDEX rrank ON ks_0.rank_by_year_and_name (rank);
+
+CREATE INDEX ryear ON ks_0.rank_by_year_and_name (race_year);
+
+CREATE TABLE ks_0.ztable (
+ zkey text,
+ a frozen,
+ PRIMARY KEY (zkey)
+) WITH additional_write_policy = '99p'
+ AND bloom_filter_fp_chance = 0.1
+ AND caching = {'keys':'ALL','rows_per_partition':'NONE'}
+ AND comment = ''
+ AND compaction = {'class':'org.apache.cassandra.db.compaction.LeveledCompactionStrategy','max_threshold':'32','min_threshold':'4','sstable_size_in_mb':'95'}
+ AND compression = {'chunk_length_in_kb':'64','class':'org.apache.cassandra.io.compress.LZ4Compressor'}
+ AND crc_check_chance = 1.0
+ AND default_time_to_live = 0
+ AND extensions = {}
+ AND gc_grace_seconds = 864000
+ AND max_index_interval = 2048
+ AND memtable_flush_period_in_ms = 0
+ AND min_index_interval = 128
+ AND read_repair = 'BLOCKING'
+ AND speculative_retry = '99p';
+
+CREATE MATERIALIZED VIEW ks_0.cyclist_by_a_age AS
+SELECT * FROM ks_0.cyclist_mv
+WHERE age IS NOT NULL AND cid IS NOT NULL
+PRIMARY KEY (age, cid) WITH additional_write_policy = '99p'
+ AND bloom_filter_fp_chance = 0.01
+ AND caching = {'keys':'ALL','rows_per_partition':'NONE'}
+ AND comment = ''
+ AND compaction = {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'}
+ AND compression = {'chunk_length_in_kb':'64','class':'org.apache.cassandra.io.compress.LZ4Compressor'}
+ AND crc_check_chance = 1.0
+ AND extensions = {}
+ AND gc_grace_seconds = 864000
+ AND max_index_interval = 2048
+ AND memtable_flush_period_in_ms = 0
+ AND min_index_interval = 128
+ AND read_repair = 'BLOCKING'
+ AND speculative_retry = '99p';
+
+CREATE MATERIALIZED VIEW ks_0.cyclist_by_age AS
+SELECT
+ age,
+ cid,
+ birthday,
+ country,
+ name
+FROM ks_0.cyclist_mv
+WHERE age IS NOT NULL AND cid IS NOT NULL
+PRIMARY KEY (age, cid) WITH additional_write_policy = '99p'
+ AND bloom_filter_fp_chance = 0.01
+ AND caching = {'keys':'ALL','rows_per_partition':'NONE'}
+ AND comment = 'simple view'
+ AND compaction = {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'}
+ AND compression = {'chunk_length_in_kb':'64','class':'org.apache.cassandra.io.compress.LZ4Compressor'}
+ AND crc_check_chance = 1.0
+ AND extensions = {}
+ AND gc_grace_seconds = 864000
+ AND max_index_interval = 2048
+ AND memtable_flush_period_in_ms = 0
+ AND min_index_interval = 128
+ AND read_repair = 'BLOCKING'
+ AND speculative_retry = '99p';
+
+CREATE MATERIALIZED VIEW ks_0.cyclist_by_r_age AS
+SELECT
+ age,
+ cid,
+ birthday,
+ country,
+ name
+FROM ks_0.cyclist_mv
+WHERE age IS NOT NULL AND cid IS NOT NULL
+PRIMARY KEY (age, cid) WITH additional_write_policy = '99p'
+ AND bloom_filter_fp_chance = 0.01
+ AND caching = {'keys':'ALL','rows_per_partition':'NONE'}
+ AND comment = ''
+ AND compaction = {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy','max_threshold':'32','min_threshold':'4'}
+ AND compression = {'chunk_length_in_kb':'64','class':'org.apache.cassandra.io.compress.LZ4Compressor'}
+ AND crc_check_chance = 1.0
+ AND extensions = {}
+ AND gc_grace_seconds = 864000
+ AND max_index_interval = 2048
+ AND memtable_flush_period_in_ms = 0
+ AND min_index_interval = 128
+ AND read_repair = 'BLOCKING'
+ AND speculative_retry = '99p';
+
+CREATE FUNCTION ks_0.avgfinal(state tuple)
+ CALLED ON NULL INPUT
+ RETURNS double
+ LANGUAGE java
+ AS 'double r = 0; if (state.getInt(0) == 0) return null; r = state.getLong(1); r /= state.getInt(0); return Double.valueOf(r);';
+
+CREATE FUNCTION ks_0.avgstate(state tuple,val int)
+ CALLED ON NULL INPUT
+ RETURNS tuple
+ LANGUAGE java
+ AS 'if (val !=null) { state.setInt(0, state.getInt(0)+1); state.setLong(1, state.getLong(1)+val.intValue()); } return state;';
+
+CREATE AGGREGATE ks_0.average(int)
+ SFUNC avgstate
+ STYPE tuple
+ FINALFUNC avgfinal
+ INITCOND (0,0);
+
+CREATE AGGREGATE ks_0.mean(int)
+ SFUNC avgstate
+ STYPE tuple
+ FINALFUNC avgfinal
+ INITCOND (0,0);
diff --git a/integration-tests/src/test/resources/DescribeIT/oss/2.1.cql b/integration-tests/src/test/resources/DescribeIT/oss/2.1.cql
index 05408ba0924..ea6ca93bcbf 100644
--- a/integration-tests/src/test/resources/DescribeIT/oss/2.1.cql
+++ b/integration-tests/src/test/resources/DescribeIT/oss/2.1.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
@@ -63,4 +64,4 @@ CREATE TABLE ks_0.ztable (
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
- AND speculative_retry = '99.0PERCENTILE';
\ No newline at end of file
+ AND speculative_retry = '99.0PERCENTILE';
diff --git a/integration-tests/src/test/resources/DescribeIT/oss/2.2.cql b/integration-tests/src/test/resources/DescribeIT/oss/2.2.cql
index 5b4442133c3..a4035ffa90e 100644
--- a/integration-tests/src/test/resources/DescribeIT/oss/2.2.cql
+++ b/integration-tests/src/test/resources/DescribeIT/oss/2.2.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
@@ -110,4 +111,4 @@ CREATE AGGREGATE ks_0.mean(int)
SFUNC avgstate
STYPE tuple
FINALFUNC avgfinal
- INITCOND (0,0);
\ No newline at end of file
+ INITCOND (0,0);
diff --git a/integration-tests/src/test/resources/DescribeIT/oss/3.0.cql b/integration-tests/src/test/resources/DescribeIT/oss/3.0.cql
index 25b42c58d68..2572df52e24 100644
--- a/integration-tests/src/test/resources/DescribeIT/oss/3.0.cql
+++ b/integration-tests/src/test/resources/DescribeIT/oss/3.0.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
@@ -185,4 +186,4 @@ CREATE AGGREGATE ks_0.mean(int)
SFUNC avgstate
STYPE tuple
FINALFUNC avgfinal
- INITCOND (0,0);
\ No newline at end of file
+ INITCOND (0,0);
diff --git a/integration-tests/src/test/resources/DescribeIT/oss/3.11.cql b/integration-tests/src/test/resources/DescribeIT/oss/3.11.cql
index 25b42c58d68..2572df52e24 100644
--- a/integration-tests/src/test/resources/DescribeIT/oss/3.11.cql
+++ b/integration-tests/src/test/resources/DescribeIT/oss/3.11.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
@@ -185,4 +186,4 @@ CREATE AGGREGATE ks_0.mean(int)
SFUNC avgstate
STYPE tuple
FINALFUNC avgfinal
- INITCOND (0,0);
\ No newline at end of file
+ INITCOND (0,0);
diff --git a/integration-tests/src/test/resources/DescribeIT/oss/4.0.cql b/integration-tests/src/test/resources/DescribeIT/oss/4.0.cql
index 15ff0f5e9dc..abc70728206 100644
--- a/integration-tests/src/test/resources/DescribeIT/oss/4.0.cql
+++ b/integration-tests/src/test/resources/DescribeIT/oss/4.0.cql
@@ -1,3 +1,4 @@
+
CREATE KEYSPACE ks_0 WITH replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND durable_writes = true;
CREATE TYPE ks_0.btype (
diff --git a/integration-tests/src/test/resources/application.conf b/integration-tests/src/test/resources/application.conf
index 668a71059cf..f3ab31bcb76 100644
--- a/integration-tests/src/test/resources/application.conf
+++ b/integration-tests/src/test/resources/application.conf
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# Configuration overrides for integration tests
datastax-java-driver {
basic {
@@ -45,4 +62,4 @@ datastax-java-driver {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/integration-tests/src/test/resources/logback-test.xml b/integration-tests/src/test/resources/logback-test.xml
index b3668ff68b0..a2179e4357b 100644
--- a/integration-tests/src/test/resources/logback-test.xml
+++ b/integration-tests/src/test/resources/logback-test.xml
@@ -1,13 +1,15 @@
+
## Manual
Driver modules:
@@ -14,4 +33,4 @@ Common topics:
* [API conventions](api_conventions/)
* [Case sensitivity](case_sensitivity/)
* [OSGi](osgi/)
-* [Cloud](cloud/)
\ No newline at end of file
+* [Cloud](cloud/)
diff --git a/manual/api_conventions/README.md b/manual/api_conventions/README.md
index a76067ebef2..553392658dd 100644
--- a/manual/api_conventions/README.md
+++ b/manual/api_conventions/README.md
@@ -1,3 +1,22 @@
+
+
## API conventions
In previous versions, the driver relied solely on Java visibility rules: everything was either
@@ -41,4 +60,4 @@ internalContext.getEventBus().fire(TopologyEvent.forceDown(address));
So the risk of unintentionally using the internal API is very low. To double-check, you can always
grep `import com.datastax.oss.driver.internal` in your source files.
-[semantic versioning]: http://semver.org/
\ No newline at end of file
+[semantic versioning]: http://semver.org/
diff --git a/manual/case_sensitivity/README.md b/manual/case_sensitivity/README.md
index 865354f41df..e9dbf1bf9a8 100644
--- a/manual/case_sensitivity/README.md
+++ b/manual/case_sensitivity/README.md
@@ -1,3 +1,22 @@
+
+
## Case sensitivity
### In Cassandra
@@ -106,18 +125,18 @@ For "consuming" methods, string overloads are also provided for convenience, for
* in other cases, the string is always assumed to be in CQL form, and converted on the fly with
`CqlIdentifier.fromCql`.
-[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlIdentifier.html
-[Row]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Row.html
-[UdtValue]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/UdtValue.html
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[AccessibleByName]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/AccessibleByName.html
+[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlIdentifier.html
+[Row]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Row.html
+[UdtValue]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/UdtValue.html
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[AccessibleByName]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/AccessibleByName.html
### Good practices
As should be clear by now, case sensitivity introduces a lot of extra (and arguably unnecessary)
complexity.
-The Java driver team's recommendation is:
+The Java Driver team's recommendation is:
> **Always use case-insensitive identifiers in your data model.**
@@ -130,4 +149,4 @@ If you worry about readability, use snake case (`shopping_cart`), or simply stic
The only reason to use case sensitivity should be if you don't control the data model. In that
case, either pass quoted strings to the driver, or use `CqlIdentifier` instances (stored as
-constants to avoid creating them over and over).
\ No newline at end of file
+constants to avoid creating them over and over).
diff --git a/manual/cloud/README.md b/manual/cloud/README.md
index f483d9ae918..9116b03dac3 100644
--- a/manual/cloud/README.md
+++ b/manual/cloud/README.md
@@ -1,6 +1,25 @@
+
+
## Connecting to Astra (Cloud)
-Using the DataStax Java Driver to connect to a DataStax Astra database is almost identical to using
+Using the Java Driver to connect to a DataStax Astra database is almost identical to using
the driver to connect to any normal Apache Cassandra® database. The only differences are in how the
driver is configured in an application and that you will need to obtain a *secure connect bundle*.
@@ -9,10 +28,10 @@ driver is configured in an application and that you will need to obtain a *secur
1. [Download][Download Maven] and [install][Install Maven] Maven.
2. Create an Astra database on [AWS/Azure/GCP][Create an Astra database - AWS/Azure/GCP];
alternatively, have a team member provide access to their
- Astra database (instructions for [AWS/Azure/GCP][Access an Astra database - AWS/Azure/GCP] to
+ Astra database (see instructions for [AWS/Azure/GCP][Access an Astra database - AWS/Azure/GCP]) to
obtain database connection details.
-3. Download the secure connect bundle (instructions for
- [AWS/Azure/GCP][Download the secure connect bundle - AWS/Azure/GCP], that contains connection
+3. Download the secure connect bundle (see instructions for
+ [AWS/Azure/GCP][Download the secure connect bundle - AWS/Azure/GCP]) that contains connection
information such as contact points and certificates.
### Procedure
diff --git a/manual/core/README.md b/manual/core/README.md
index 8cc6b670b99..5ca4cd7872f 100644
--- a/manual/core/README.md
+++ b/manual/core/README.md
@@ -1,3 +1,22 @@
+
+
## Core driver
The core module handles cluster connectivity and request execution. It is published under the
@@ -5,7 +24,7 @@ following coordinates:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -231,34 +250,35 @@ See [AccessibleByName] for an explanation of the conversion rules.
##### CQL to Java type mapping
-| CQL3 data type | Getter name | Java type | See also |
-|---------------------|----------------|----------------------|-------------------------------------|
-| ascii | getString | java.lang.String | |
-| bigint | getLong | long | |
-| blob | getByteBuffer | java.nio.ByteBuffer | |
-| boolean | getBoolean | boolean | |
-| counter | getLong | long | |
-| date | getLocalDate | java.time.LocalDate | [Temporal types](temporal_types/) |
-| decimal | getBigDecimal | java.math.BigDecimal | |
-| double | getDouble | double | |
-| duration | getCqlDuration | [CqlDuration] | [Temporal types](temporal_types/) |
-| float | getFloat | float | |
-| inet | getInetAddress | java.net.InetAddress | |
-| int | getInt | int | |
-| list | getList | java.util.List | |
-| map | getMap | java.util.Map | |
-| set | getSet | java.util.Set | |
-| smallint | getShort | short | |
-| text | getString | java.lang.String | |
-| time | getLocalTime | java.time.LocalTime | [Temporal types](temporal_types/) |
-| timestamp | getInstant | java.time.Instant | [Temporal types](temporal_types/) |
-| timeuuid | getUuid | java.util.UUID | |
-| tinyint | getByte | byte | |
-| tuple | getTupleValue | [TupleValue] | [Tuples](tuples/) |
-| user-defined types | getUDTValue | [UDTValue] | [User-defined types](udts/) |
-| uuid | getUuid | java.util.UUID | |
-| varchar | getString | java.lang.String | |
-| varint | getBigInteger | java.math.BigInteger | |
+| CQL3 data type | Getter name | Java type | See also |
+|--------------------|----------------|----------------------|-----------------------------------|
+| ascii | getString | java.lang.String | |
+| bigint | getLong | long | |
+| blob | getByteBuffer | java.nio.ByteBuffer | |
+| boolean | getBoolean | boolean | |
+| counter | getLong | long | |
+| date | getLocalDate | java.time.LocalDate | [Temporal types](temporal_types/) |
+| decimal | getBigDecimal | java.math.BigDecimal | |
+| double | getDouble | double | |
+| duration | getCqlDuration | [CqlDuration] | [Temporal types](temporal_types/) |
+| float | getFloat | float | |
+| inet | getInetAddress | java.net.InetAddress | |
+| int | getInt | int | |
+| list | getList | java.util.List | |
+| map | getMap | java.util.Map | |
+| set | getSet | java.util.Set | |
+| smallint | getShort | short | |
+| text | getString | java.lang.String | |
+| time | getLocalTime | java.time.LocalTime | [Temporal types](temporal_types/) |
+| timestamp | getInstant | java.time.Instant | [Temporal types](temporal_types/) |
+| timeuuid | getUuid | java.util.UUID | |
+| tinyint | getByte | byte | |
+| tuple | getTupleValue | [TupleValue] | [Tuples](tuples/) |
+| user-defined types | getUDTValue | [UDTValue] | [User-defined types](udts/) |
+| uuid | getUuid | java.util.UUID | |
+| varchar | getString | java.lang.String | |
+| varint | getBigInteger | java.math.BigInteger | |
+| vector | getVector | [CqlVector] | [Custom Codecs](custom_codecs/) |
Sometimes the driver has to infer a CQL type from a Java type (for example when handling the values
of [simple statements](statements/simple/)); for those that have multiple CQL equivalents, it makes
@@ -314,18 +334,19 @@ for (ColumnDefinitions.Definition definition : row.getColumnDefinitions()) {
}
```
-[CqlSession]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlSession.html
-[CqlSession#builder()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlSession.html#builder--
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[Row]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Row.html
-[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlIdentifier.html
-[AccessibleByName]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/AccessibleByName.html
-[GenericType]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
-[CqlDuration]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/CqlDuration.html
-[TupleValue]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/TupleValue.html
-[UdtValue]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/UdtValue.html
-[SessionBuilder.addContactPoint()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addContactPoint-java.net.InetSocketAddress-
-[SessionBuilder.addContactPoints()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addContactPoints-java.util.Collection-
-[SessionBuilder.withLocalDatacenter()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withLocalDatacenter-java.lang.String-
-
-[CASSANDRA-10145]: https://issues.apache.org/jira/browse/CASSANDRA-10145
\ No newline at end of file
+[CqlSession]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlSession.html
+[CqlSession#builder()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlSession.html#builder--
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[Row]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Row.html
+[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlIdentifier.html
+[AccessibleByName]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/AccessibleByName.html
+[GenericType]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
+[CqlDuration]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/CqlDuration.html
+[CqlVector]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/CqlVector.html
+[TupleValue]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/TupleValue.html
+[UdtValue]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/UdtValue.html
+[SessionBuilder.addContactPoint()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addContactPoint-java.net.InetSocketAddress-
+[SessionBuilder.addContactPoints()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addContactPoints-java.util.Collection-
+[SessionBuilder.withLocalDatacenter()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withLocalDatacenter-java.lang.String-
+
+[CASSANDRA-10145]: https://issues.apache.org/jira/browse/CASSANDRA-10145
diff --git a/manual/core/address_resolution/README.md b/manual/core/address_resolution/README.md
index fe8c967a62a..5b2536feb18 100644
--- a/manual/core/address_resolution/README.md
+++ b/manual/core/address_resolution/README.md
@@ -1,3 +1,22 @@
+
+
## Address resolution
### Quick overview
@@ -99,6 +118,55 @@ datastax-java-driver.advanced.address-translator.class = com.mycompany.MyAddress
Note: the contact points provided while creating the `CqlSession` are not translated, only addresses
retrieved from or sent by Cassandra nodes are.
+### Fixed proxy hostname
+
+If your client applications access Cassandra through some kind of proxy (eg. with AWS PrivateLink when all Cassandra
+nodes are exposed via one hostname pointing to AWS Endpoint), you can configure driver with
+`FixedHostNameAddressTranslator` to always translate all node addresses to that same proxy hostname, no matter what IP
+address a node has but still using its native transport port.
+
+To use it, specify the following in the [configuration](../configuration):
+
+```
+datastax-java-driver.advanced.address-translator.class = FixedHostNameAddressTranslator
+advertised-hostname = proxyhostname
+```
+
+### Fixed proxy hostname per subnet
+
+When running Cassandra in a private network and accessing it from outside of that private network via some kind of
+proxy, we have an option to use `FixedHostNameAddressTranslator`. But for multi-datacenter Cassandra deployments, we
+want to have more control over routing queries to a specific datacenter (eg. for optimizing latencies), which requires
+setting up a separate proxy per datacenter.
+
+Normally, each Cassandra datacenter nodes are deployed to a different subnet to support internode communications in the
+cluster and avoid IP address collisions. So when Cassandra broadcasts its nodes IP addresses, we can determine which
+datacenter that node belongs to by checking its IP address against the given datacenter subnet.
+
+For such scenarios you can use `SubnetAddressTranslator` to translate node IPs to the datacenter proxy address
+associated with it.
+
+To use it, specify the following in the [configuration](../configuration):
+```
+datastax-java-driver.advanced.address-translator {
+ class = SubnetAddressTranslator
+ subnet-addresses {
+ "100.64.0.0/15" = "cassandra.datacenter1.com:9042"
+ "100.66.0.0/15" = "cassandra.datacenter2.com:9042"
+ # IPv6 example:
+ # "::ffff:6440:0/111" = "cassandra.datacenter1.com:9042"
+ # "::ffff:6442:0/111" = "cassandra.datacenter2.com:9042"
+ }
+ # Optional. When configured, addresses not matching the configured subnets are translated to this address.
+ default-address = "cassandra.datacenter1.com:9042"
+ # Whether to resolve the addresses once on initialization (if true) or on each node (re-)connection (if false).
+ # If not configured, defaults to false.
+ resolve-addresses = false
+}
+```
+
+Such setup is common for running Cassandra on Kubernetes with [k8ssandra](https://docs.k8ssandra.io/).
+
### EC2 multi-region
If you deploy both Cassandra and client applications on Amazon EC2, and your cluster spans multiple regions, you'll have
@@ -124,7 +192,7 @@ Cassandra node:
domain name of the target instance. Then it performs a forward DNS lookup of the domain name; the EC2 DNS does the
private/public switch automatically based on location).
-[AddressTranslator]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/addresstranslation/AddressTranslator.html
+[AddressTranslator]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/addresstranslation/AddressTranslator.html
[cassandra.yaml]: https://docs.datastax.com/en/cassandra/3.x/cassandra/configuration/configCassandra_yaml.html
[rpc_address]: https://docs.datastax.com/en/cassandra/3.x/cassandra/configuration/configCassandra_yaml.html?scroll=configCassandra_yaml__rpc_address
diff --git a/manual/core/async/README.md b/manual/core/async/README.md
index 1daecfd61ee..5b4bac3dccf 100644
--- a/manual/core/async/README.md
+++ b/manual/core/async/README.md
@@ -1,3 +1,22 @@
+
+
## Asynchronous programming
### Quick overview
@@ -207,4 +226,4 @@ documentation for more details and an example.
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
-[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
\ No newline at end of file
+[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
diff --git a/manual/core/authentication/README.md b/manual/core/authentication/README.md
index 45742c3aac2..516e47f558f 100644
--- a/manual/core/authentication/README.md
+++ b/manual/core/authentication/README.md
@@ -1,3 +1,22 @@
+
+
## Authentication
### Quick overview
@@ -227,13 +246,13 @@ session.execute(statement);
[SASL]: https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer
-[AuthProvider]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/auth/AuthProvider.html
-[DriverContext]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/context/DriverContext.html
-[PlainTextAuthProviderBase]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/auth/PlainTextAuthProviderBase.html
-[ProgrammaticPlainTextAuthProvider]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/auth/ProgrammaticPlainTextAuthProvider.html
-[DseGssApiAuthProviderBase]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderBase.html
-[ProgrammaticDseGssApiAuthProvider]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/auth/ProgrammaticDseGssApiAuthProvider.html
-[ProxyAuthentication.executeAs]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/auth/ProxyAuthentication.html#executeAs-java.lang.String-StatementT-
-[SessionBuilder.withAuthCredentials]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withAuthCredentials-java.lang.String-java.lang.String-
-[SessionBuilder.withAuthProvider]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withAuthProvider-com.datastax.oss.driver.api.core.auth.AuthProvider-
-[reference.conf]: ../configuration/reference/
\ No newline at end of file
+[AuthProvider]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/auth/AuthProvider.html
+[DriverContext]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/context/DriverContext.html
+[PlainTextAuthProviderBase]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/auth/PlainTextAuthProviderBase.html
+[ProgrammaticPlainTextAuthProvider]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/auth/ProgrammaticPlainTextAuthProvider.html
+[DseGssApiAuthProviderBase]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/auth/DseGssApiAuthProviderBase.html
+[ProgrammaticDseGssApiAuthProvider]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/auth/ProgrammaticDseGssApiAuthProvider.html
+[ProxyAuthentication.executeAs]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/auth/ProxyAuthentication.html#executeAs-java.lang.String-StatementT-
+[SessionBuilder.withAuthCredentials]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withAuthCredentials-java.lang.String-java.lang.String-
+[SessionBuilder.withAuthProvider]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withAuthProvider-com.datastax.oss.driver.api.core.auth.AuthProvider-
+[reference.conf]: ../configuration/reference/
diff --git a/manual/core/bom/README.md b/manual/core/bom/README.md
index dc8f12eb599..235edcf632c 100644
--- a/manual/core/bom/README.md
+++ b/manual/core/bom/README.md
@@ -1,3 +1,22 @@
+
+
## Bill of Materials (BOM)
A "Bill Of Materials" is a special Maven descriptor that defines the versions of a set of related
@@ -11,9 +30,9 @@ To import the driver's BOM, add the following section in your application's own
- com.datastax.oss
+ org.apache.cassandra
java-driver-bom
- 4.15.0
+ 4.17.0
pom
import
@@ -28,7 +47,7 @@ This allows you to omit the version when you later reference the driver artifact
...
- com.datastax.oss
+ org.apache.cassandra
java-driver-query-builder
@@ -52,7 +71,7 @@ scope:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-processor
provided
@@ -65,12 +84,12 @@ good idea to extract a property to keep it in sync with the BOM:
```xml
- 4.15.0
+ 4.17.0
- com.datastax.oss
+ org.apache.cassandra
java-driver-bom
${java-driver.version}
pom
@@ -81,7 +100,7 @@ good idea to extract a property to keep it in sync with the BOM:
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-runtime
@@ -93,7 +112,7 @@ good idea to extract a property to keep it in sync with the BOM:
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-processor
${java-driver.version}
diff --git a/manual/core/compression/README.md b/manual/core/compression/README.md
index 0697ea1737b..9f7ae3c4854 100644
--- a/manual/core/compression/README.md
+++ b/manual/core/compression/README.md
@@ -1,3 +1,22 @@
+
+
## Compression
### Quick overview
@@ -27,7 +46,7 @@ datastax-java-driver {
Compression must be set before opening a session, it cannot be changed at runtime.
-Two algorithms are supported out of the box: [LZ4](https://github.com/jpountz/lz4-java) and
+Two algorithms are supported out of the box: [LZ4](https://github.com/yawkat/lz4-java) and
[Snappy](http://google.github.io/snappy/). The LZ4 implementation is a good first choice; it offers
fallback implementations in case native libraries fail to load and
[benchmarks](http://java-performance.info/performance-general-compression/) suggest that it offers
@@ -44,9 +63,9 @@ Dependency:
```xml
- org.lz4
+ at.yawk.lz4
lz4-java
- 1.4.1
+ 1.10.1
```
@@ -82,4 +101,4 @@ Dependency:
Always double-check the exact Snappy version needed; you can find it in the driver's [parent POM].
-[parent POM]: https://search.maven.org/search?q=g:com.datastax.oss%20AND%20a:java-driver-parent&core=gav
\ No newline at end of file
+[parent POM]: https://search.maven.org/search?q=g:com.datastax.oss%20AND%20a:java-driver-parent&core=gav
diff --git a/manual/core/configuration/README.md b/manual/core/configuration/README.md
index 7dc9fd73afc..deefadbe3d4 100644
--- a/manual/core/configuration/README.md
+++ b/manual/core/configuration/README.md
@@ -1,3 +1,22 @@
+
+
## Configuration
### Quick overview
@@ -357,7 +376,7 @@ using Maven, this can be achieved as follows:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
...
@@ -520,16 +539,16 @@ config.getDefaultProfile().getString(MyCustomOption.ADMIN_EMAIL);
config.getDefaultProfile().getInt(MyCustomOption.AWESOMENESS_FACTOR);
```
-[DriverConfig]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfig.html
-[DriverExecutionProfile]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverExecutionProfile.html
-[DriverContext]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/context/DriverContext.html
-[DriverOption]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverOption.html
-[DefaultDriverOption]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DefaultDriverOption.html
-[DriverConfigLoader]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html
-[DriverConfigLoader.fromClasspath]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromClasspath-java.lang.String-
-[DriverConfigLoader.fromFile]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromFile-java.io.File-
-[DriverConfigLoader.fromUrl]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromUrl-java.net.URL-
-[DriverConfigLoader.programmaticBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#programmaticBuilder--
+[DriverConfig]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfig.html
+[DriverExecutionProfile]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverExecutionProfile.html
+[DriverContext]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/context/DriverContext.html
+[DriverOption]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverOption.html
+[DefaultDriverOption]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DefaultDriverOption.html
+[DriverConfigLoader]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html
+[DriverConfigLoader.fromClasspath]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromClasspath-java.lang.String-
+[DriverConfigLoader.fromFile]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromFile-java.io.File-
+[DriverConfigLoader.fromUrl]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromUrl-java.net.URL-
+[DriverConfigLoader.programmaticBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#programmaticBuilder--
[Typesafe Config]: https://github.com/typesafehub/config
[config standard behavior]: https://github.com/typesafehub/config#standard-behavior
diff --git a/manual/core/configuration/reference/README.rst b/manual/core/configuration/reference/README.rst
index e6da9306a75..d4989ecf641 100644
--- a/manual/core/configuration/reference/README.rst
+++ b/manual/core/configuration/reference/README.rst
@@ -1,3 +1,21 @@
+..
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
Reference configuration
-----------------------
diff --git a/manual/core/control_connection/README.md b/manual/core/control_connection/README.md
index d8a9cddc718..38544797aed 100644
--- a/manual/core/control_connection/README.md
+++ b/manual/core/control_connection/README.md
@@ -1,3 +1,22 @@
+
+
## Control connection
The control connection is a dedicated connection used for administrative tasks:
@@ -23,4 +42,4 @@ There are a few options to fine tune the control connection behavior in the
`advanced.control-connection` and `advanced.metadata` sections; see the [metadata](../metadata/)
pages and the [reference configuration](../configuration/reference/) for all the details.
-[Node.getOpenConnections]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#getOpenConnections--
\ No newline at end of file
+[Node.getOpenConnections]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#getOpenConnections--
diff --git a/manual/core/custom_codecs/README.md b/manual/core/custom_codecs/README.md
index 92a0274577b..f3b7be1e3d9 100644
--- a/manual/core/custom_codecs/README.md
+++ b/manual/core/custom_codecs/README.md
@@ -1,3 +1,22 @@
+
+
## Custom codecs
### Quick overview
@@ -256,6 +275,17 @@ that maps instances of that class to Json strings, using a newly-allocated, defa
It is also possible to pass a custom `ObjectMapper` instance using [ExtraTypeCodecs.json(Class,
ObjectMapper)] instead.
+#### Mapping CQL vectors to Java array
+
+By default, the driver maps CQL `vector` to the [CqlVector] value type. If you prefer to deal with
+arrays, the driver offers the following codec:
+
+| Codec | CQL type | Java type |
+|-------------------------------------------|-----------------|-----------|
+| [ExtraTypeCodecs.floatVectorToArray(int)] | `vector` | `float[]` |
+
+This release only provides a codec for vectors containing float values.
+
### Writing codecs
If none of the driver built-in codecs above suits you, it is also possible to roll your own.
@@ -660,13 +690,13 @@ private static String formatRow(Row row) {
}
```
-[CodecRegistry]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html
-[GenericType]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
-[TypeCodec]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodec.html
-[format()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodec.html#format-JavaTypeT-
-[parse()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodec.html#parse-java.lang.String-
-[MappingCodec]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/MappingCodec.html
-[SessionBuilder.addTypeCodecs]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addTypeCodecs-com.datastax.oss.driver.api.core.type.codec.TypeCodec...-
+[CodecRegistry]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html
+[GenericType]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
+[TypeCodec]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodec.html
+[format()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodec.html#format-JavaTypeT-
+[parse()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodec.html#parse-java.lang.String-
+[MappingCodec]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/MappingCodec.html
+[SessionBuilder.addTypeCodecs]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addTypeCodecs-com.datastax.oss.driver.api.core.type.codec.TypeCodec...-
[Enums]: https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html
[Enum.name()]: https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#name--
@@ -680,38 +710,39 @@ private static String formatRow(Row row) {
[java.time.LocalDateTime]: https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html
[java.time.ZoneId]: https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html
-[ExtraTypeCodecs]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html
-[ExtraTypeCodecs.BLOB_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#BLOB_TO_ARRAY
-[ExtraTypeCodecs.BOOLEAN_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#BOOLEAN_LIST_TO_ARRAY
-[ExtraTypeCodecs.BYTE_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#BYTE_LIST_TO_ARRAY
-[ExtraTypeCodecs.SHORT_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#SHORT_LIST_TO_ARRAY
-[ExtraTypeCodecs.INT_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#INT_LIST_TO_ARRAY
-[ExtraTypeCodecs.LONG_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#LONG_LIST_TO_ARRAY
-[ExtraTypeCodecs.FLOAT_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#FLOAT_LIST_TO_ARRAY
-[ExtraTypeCodecs.DOUBLE_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#DOUBLE_LIST_TO_ARRAY
-[ExtraTypeCodecs.listToArrayOf(TypeCodec)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#listToArrayOf-com.datastax.oss.driver.api.core.type.codec.TypeCodec-
-[ExtraTypeCodecs.TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#TIMESTAMP_UTC
-[ExtraTypeCodecs.timestampAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#timestampAt-java.time.ZoneId-
-[ExtraTypeCodecs.TIMESTAMP_MILLIS_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#TIMESTAMP_MILLIS_SYSTEM
-[ExtraTypeCodecs.TIMESTAMP_MILLIS_UTC]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#TIMESTAMP_MILLIS_UTC
-[ExtraTypeCodecs.timestampMillisAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#timestampMillisAt-java.time.ZoneId-
-[ExtraTypeCodecs.ZONED_TIMESTAMP_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#ZONED_TIMESTAMP_SYSTEM
-[ExtraTypeCodecs.ZONED_TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#ZONED_TIMESTAMP_UTC
-[ExtraTypeCodecs.zonedTimestampAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#zonedTimestampAt-java.time.ZoneId-
-[ExtraTypeCodecs.LOCAL_TIMESTAMP_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#LOCAL_TIMESTAMP_SYSTEM
-[ExtraTypeCodecs.LOCAL_TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#LOCAL_TIMESTAMP_UTC
-[ExtraTypeCodecs.localTimestampAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#localTimestampAt-java.time.ZoneId-
-[ExtraTypeCodecs.ZONED_TIMESTAMP_PERSISTED]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#ZONED_TIMESTAMP_PERSISTED
-[ExtraTypeCodecs.optionalOf(TypeCodec)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#optionalOf-com.datastax.oss.driver.api.core.type.codec.TypeCodec-
-[ExtraTypeCodecs.enumNamesOf(Class)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#enumNamesOf-java.lang.Class-
-[ExtraTypeCodecs.enumOrdinalsOf(Class)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#enumOrdinalsOf-java.lang.Class-
-[ExtraTypeCodecs.json(Class)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#json-java.lang.Class-
-[ExtraTypeCodecs.json(Class, ObjectMapper)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#json-java.lang.Class-com.fasterxml.jackson.databind.ObjectMapper-
-
-[TypeCodecs.BLOB]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#BLOB
-[TypeCodecs.TIMESTAMP]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#TIMESTAMP
+[ExtraTypeCodecs]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html
+[ExtraTypeCodecs.BLOB_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#BLOB_TO_ARRAY
+[ExtraTypeCodecs.BOOLEAN_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#BOOLEAN_LIST_TO_ARRAY
+[ExtraTypeCodecs.BYTE_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#BYTE_LIST_TO_ARRAY
+[ExtraTypeCodecs.SHORT_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#SHORT_LIST_TO_ARRAY
+[ExtraTypeCodecs.INT_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#INT_LIST_TO_ARRAY
+[ExtraTypeCodecs.LONG_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#LONG_LIST_TO_ARRAY
+[ExtraTypeCodecs.FLOAT_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#FLOAT_LIST_TO_ARRAY
+[ExtraTypeCodecs.DOUBLE_LIST_TO_ARRAY]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#DOUBLE_LIST_TO_ARRAY
+[ExtraTypeCodecs.listToArrayOf(TypeCodec)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#listToArrayOf-com.datastax.oss.driver.api.core.type.codec.TypeCodec-
+[ExtraTypeCodecs.TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#TIMESTAMP_UTC
+[ExtraTypeCodecs.timestampAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#timestampAt-java.time.ZoneId-
+[ExtraTypeCodecs.TIMESTAMP_MILLIS_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#TIMESTAMP_MILLIS_SYSTEM
+[ExtraTypeCodecs.TIMESTAMP_MILLIS_UTC]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#TIMESTAMP_MILLIS_UTC
+[ExtraTypeCodecs.timestampMillisAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#timestampMillisAt-java.time.ZoneId-
+[ExtraTypeCodecs.ZONED_TIMESTAMP_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#ZONED_TIMESTAMP_SYSTEM
+[ExtraTypeCodecs.ZONED_TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#ZONED_TIMESTAMP_UTC
+[ExtraTypeCodecs.zonedTimestampAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#zonedTimestampAt-java.time.ZoneId-
+[ExtraTypeCodecs.LOCAL_TIMESTAMP_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#LOCAL_TIMESTAMP_SYSTEM
+[ExtraTypeCodecs.LOCAL_TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#LOCAL_TIMESTAMP_UTC
+[ExtraTypeCodecs.localTimestampAt(ZoneId)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#localTimestampAt-java.time.ZoneId-
+[ExtraTypeCodecs.ZONED_TIMESTAMP_PERSISTED]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#ZONED_TIMESTAMP_PERSISTED
+[ExtraTypeCodecs.optionalOf(TypeCodec)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#optionalOf-com.datastax.oss.driver.api.core.type.codec.TypeCodec-
+[ExtraTypeCodecs.enumNamesOf(Class)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#enumNamesOf-java.lang.Class-
+[ExtraTypeCodecs.enumOrdinalsOf(Class)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#enumOrdinalsOf-java.lang.Class-
+[ExtraTypeCodecs.json(Class)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#json-java.lang.Class-
+[ExtraTypeCodecs.json(Class, ObjectMapper)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#json-java.lang.Class-com.fasterxml.jackson.databind.ObjectMapper-
+[ExtraTypeCodecs.floatVectorToArray(int)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/ExtraTypeCodecs.html#floatVectorToArray-int-
+
+[TypeCodecs.BLOB]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#BLOB
+[TypeCodecs.TIMESTAMP]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#TIMESTAMP
[ObjectMapper]: http://fasterxml.github.io/jackson-databind/javadoc/2.10/com/fasterxml/jackson/databind/ObjectMapper.html
-[CQL blob example]: https://github.com/datastax/java-driver/blob/4.x/examples/src/main/java/com/datastax/oss/driver/examples/datatypes/Blobs.java
\ No newline at end of file
+[CQL blob example]: https://github.com/datastax/java-driver/blob/4.x/examples/src/main/java/com/datastax/oss/driver/examples/datatypes/Blobs.java
diff --git a/manual/core/detachable_types/README.md b/manual/core/detachable_types/README.md
index a0f38d11f74..7968835dd8a 100644
--- a/manual/core/detachable_types/README.md
+++ b/manual/core/detachable_types/README.md
@@ -1,3 +1,22 @@
+
+
## Detachable types
### Quick overview
@@ -131,19 +150,19 @@ Even then, the defaults used by detached objects might be good enough for you:
* the default codec registry works if you don't have any [custom codec](../custom_codecs/);
* the binary encoding format is stable across modern protocol versions. The last changes were for
- collection encoding from v2 to v3; Java driver 4 only supports v3 and above. When in doubt, check
+ collection encoding from v2 to v3; Java Driver 4 only supports v3 and above. When in doubt, check
the "Changes" section of the [protocol specifications].
Otherwise, just make sure you reattach objects any time you deserialize them or create them from
scratch.
-[CodecRegistry]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html
-[CodecRegistry#DEFAULT]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html#DEFAULT
-[DataType]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/DataType.html
-[Detachable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/detach/Detachable.html
-[Session]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Session.html
-[ColumnDefinition]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ColumnDefinition.html
-[Row]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Row.html
+[CodecRegistry]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html
+[CodecRegistry#DEFAULT]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html#DEFAULT
+[DataType]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/DataType.html
+[Detachable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/detach/Detachable.html
+[Session]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Session.html
+[ColumnDefinition]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ColumnDefinition.html
+[Row]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Row.html
[Java serialization]: https://docs.oracle.com/javase/tutorial/jndi/objects/serial.html
[protocol specifications]: https://github.com/datastax/native-protocol/tree/1.x/src/main/resources
diff --git a/manual/core/dse/README.md b/manual/core/dse/README.md
index 8df3568e1ff..75abeafb3d7 100644
--- a/manual/core/dse/README.md
+++ b/manual/core/dse/README.md
@@ -1,3 +1,22 @@
+
+
## DSE-specific features
Some driver features only work with DataStax Enterprise:
diff --git a/manual/core/dse/geotypes/README.md b/manual/core/dse/geotypes/README.md
index 79470ec946b..eb414de4f8d 100644
--- a/manual/core/dse/geotypes/README.md
+++ b/manual/core/dse/geotypes/README.md
@@ -1,3 +1,22 @@
+
+
## Geospatial types
The driver comes with client-side representations of the DSE geospatial data types: [Point],
@@ -166,9 +185,9 @@ All geospatial types interoperate with three standard formats:
[ESRI]: https://github.com/Esri/geometry-api-java
-[LineString]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/data/geometry/LineString.html
-[Point]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/data/geometry/Point.html
-[Polygon]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/data/geometry/Polygon.html
+[LineString]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/data/geometry/LineString.html
+[Point]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/data/geometry/Point.html
+[Polygon]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/data/geometry/Polygon.html
[Well-known text]: https://en.wikipedia.org/wiki/Well-known_text
[Well-known binary]: https://en.wikipedia.org/wiki/Well-known_text#Well-known_binary
diff --git a/manual/core/dse/graph/README.md b/manual/core/dse/graph/README.md
index bc9669634ee..6bcacd44c4e 100644
--- a/manual/core/dse/graph/README.md
+++ b/manual/core/dse/graph/README.md
@@ -1,3 +1,22 @@
+
+
## Graph
The driver provides full support for DSE graph, the distributed graph database available in DataStax
@@ -74,8 +93,8 @@ fluent API returns Apache TinkerPop™ types directly.
[Apache TinkerPop™]: http://tinkerpop.apache.org/
-[CqlSession]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlSession.html
-[GraphSession]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/GraphSession.html
+[CqlSession]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlSession.html
+[GraphSession]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/GraphSession.html
[DSE developer guide]: https://docs.datastax.com/en/dse/6.0/dse-dev/datastax_enterprise/graph/graphTOC.html
[Gremlin]: https://docs.datastax.com/en/dse/6.0/dse-dev/datastax_enterprise/graph/dseGraphAbout.html#dseGraphAbout__what-is-cql
diff --git a/manual/core/dse/graph/fluent/README.md b/manual/core/dse/graph/fluent/README.md
index b7027490b33..c1645fdb234 100644
--- a/manual/core/dse/graph/fluent/README.md
+++ b/manual/core/dse/graph/fluent/README.md
@@ -1,3 +1,22 @@
+
+
## Fluent API
The driver depends on [Apache TinkerPop™], a graph computing framework that provides a fluent API to
@@ -109,8 +128,8 @@ All the DSE predicates are available on the driver side:
.values("name");
```
-[Search]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/predicates/Search.html
-[Geo]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/predicates/Geo.html
+[Search]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/predicates/Search.html
+[Geo]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/predicates/Geo.html
[Apache TinkerPop™]: http://tinkerpop.apache.org/
[TinkerPop DSL]: http://tinkerpop.apache.org/docs/current/reference/#dsl
diff --git a/manual/core/dse/graph/fluent/explicit/README.md b/manual/core/dse/graph/fluent/explicit/README.md
index b7741a0de2b..163180a4a8a 100644
--- a/manual/core/dse/graph/fluent/explicit/README.md
+++ b/manual/core/dse/graph/fluent/explicit/README.md
@@ -1,3 +1,22 @@
+
+
## Explicit execution
Fluent traversals can be wrapped into a [FluentGraphStatement] and passed to the session:
@@ -105,9 +124,9 @@ added in a future version.
See also the [parent page](../) for topics common to all fluent traversals.
-[FluentGraphStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/FluentGraphStatement.html
-[FluentGraphStatement.newInstance]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/FluentGraphStatement.html#newInstance-org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal-
-[FluentGraphStatement.builder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/FluentGraphStatement.html#builder-org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal-
-[BatchGraphStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/BatchGraphStatement.html
-[BatchGraphStatement.newInstance]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/BatchGraphStatement.html#newInstance--
-[BatchGraphStatement.builder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/BatchGraphStatement.html#builder--
+[FluentGraphStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/FluentGraphStatement.html
+[FluentGraphStatement.newInstance]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/FluentGraphStatement.html#newInstance-org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal-
+[FluentGraphStatement.builder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/FluentGraphStatement.html#builder-org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal-
+[BatchGraphStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/BatchGraphStatement.html
+[BatchGraphStatement.newInstance]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/BatchGraphStatement.html#newInstance--
+[BatchGraphStatement.builder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/BatchGraphStatement.html#builder--
diff --git a/manual/core/dse/graph/fluent/implicit/README.md b/manual/core/dse/graph/fluent/implicit/README.md
index 797189a9ae1..f838c376022 100644
--- a/manual/core/dse/graph/fluent/implicit/README.md
+++ b/manual/core/dse/graph/fluent/implicit/README.md
@@ -1,3 +1,22 @@
+
+
## Implicit execution
Instead of passing traversals to the driver, you can create a *remote traversal source* connected to
diff --git a/manual/core/dse/graph/options/README.md b/manual/core/dse/graph/options/README.md
index ad439448aa0..e4649ff34f3 100644
--- a/manual/core/dse/graph/options/README.md
+++ b/manual/core/dse/graph/options/README.md
@@ -1,3 +1,22 @@
+
+
## Graph options
There are various [configuration](../../../configuration/) options that control the execution of
@@ -157,4 +176,4 @@ not explicitly set through `advanced.graph.sub-protocol` in configuration, the v
which the driver is connected will determine the default sub-protocol version used by the driver.
For DSE 6.8.0 and later, the driver will pick "graph-binary-1.0" as the default sub-protocol
version. For DSE 6.7.x and older (or in cases where the driver can't determine the DSE version), the
-driver will pick "graphson-2.0" as the default sub-protocol version.
\ No newline at end of file
+driver will pick "graphson-2.0" as the default sub-protocol version.
diff --git a/manual/core/dse/graph/results/README.md b/manual/core/dse/graph/results/README.md
index fa98525c756..3b4d25fa012 100644
--- a/manual/core/dse/graph/results/README.md
+++ b/manual/core/dse/graph/results/README.md
@@ -1,3 +1,22 @@
+
+
## Handling graph results
[Script queries](../script/) and [explicit fluent traversals](../fluent/explicit/) return graph
@@ -109,7 +128,7 @@ translate into specific Java classes when the data is returned from the server.
Here is an exhaustive compatibility matrix (for DSE 6.0):
-| DSE graph | Java driver |
+| DSE graph | Java Driver |
|------------|---------------------|
| bigint | Long |
| blob | byte[] |
@@ -137,8 +156,8 @@ If a type doesn't have a corresponding `asXxx()` method, use the variant that ta
UUID uuid = graphNode.as(UUID.class);
```
-[GraphNode]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/GraphNode.html
-[GraphResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/GraphResultSet.html
-[AsyncGraphResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/AsyncGraphResultSet.html
+[GraphNode]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/GraphNode.html
+[GraphResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/GraphResultSet.html
+[AsyncGraphResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/AsyncGraphResultSet.html
-[DSE data types]: https://docs.datastax.com/en/dse/6.0/dse-dev/datastax_enterprise/graph/reference/refDSEGraphDataTypes.html
\ No newline at end of file
+[DSE data types]: https://docs.datastax.com/en/dse/6.0/dse-dev/datastax_enterprise/graph/reference/refDSEGraphDataTypes.html
diff --git a/manual/core/dse/graph/script/README.md b/manual/core/dse/graph/script/README.md
index b191cc7db7c..cec8e4e94ef 100644
--- a/manual/core/dse/graph/script/README.md
+++ b/manual/core/dse/graph/script/README.md
@@ -1,3 +1,22 @@
+
+
## Script API
The script API handles Gremlin-groovy requests provided as plain Java strings. To execute a script,
@@ -101,6 +120,6 @@ Note however that some types of queries can only be performed through the script
* configuration;
* DSE graph schema queries.
-[ScriptGraphStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/ScriptGraphStatement.html
-[ScriptGraphStatement.newInstance]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/ScriptGraphStatement.html#newInstance-java.lang.String-
-[ScriptGraphStatement.builder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/graph/ScriptGraphStatement.html#builder-java.lang.String-
\ No newline at end of file
+[ScriptGraphStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/ScriptGraphStatement.html
+[ScriptGraphStatement.newInstance]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/ScriptGraphStatement.html#newInstance-java.lang.String-
+[ScriptGraphStatement.builder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/graph/ScriptGraphStatement.html#builder-java.lang.String-
diff --git a/manual/core/graalvm/README.md b/manual/core/graalvm/README.md
index 6ee713a2b30..d20fb739f19 100644
--- a/manual/core/graalvm/README.md
+++ b/manual/core/graalvm/README.md
@@ -1,3 +1,22 @@
+
+
## GraalVM native images
### Quick overview
diff --git a/manual/core/idempotence/README.md b/manual/core/idempotence/README.md
index 8eb9135488a..be784dfa40b 100644
--- a/manual/core/idempotence/README.md
+++ b/manual/core/idempotence/README.md
@@ -1,3 +1,22 @@
+
+
## Query idempotence
### Quick overview
@@ -60,5 +79,5 @@ assert bs.isIdempotent();
The query builder tries to infer idempotence automatically; refer to
[its manual](../../query_builder/idempotence/) for more details.
-[Statement.setIdempotent]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Statement.html#setIdempotent-java.lang.Boolean-
-[StatementBuilder.setIdempotence]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/StatementBuilder.html#setIdempotence-java.lang.Boolean-
+[Statement.setIdempotent]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Statement.html#setIdempotent-java.lang.Boolean-
+[StatementBuilder.setIdempotence]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/StatementBuilder.html#setIdempotence-java.lang.Boolean-
diff --git a/manual/core/integration/README.md b/manual/core/integration/README.md
index 3f42b1dabfe..e2c7bc218ee 100644
--- a/manual/core/integration/README.md
+++ b/manual/core/integration/README.md
@@ -1,3 +1,22 @@
+
+
## Integration
### Quick overview
@@ -130,7 +149,7 @@ dependencies, and tell Maven that we're going to use Java 8:
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -237,7 +256,7 @@ You should see output similar to:
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- exec-maven-plugin:1.3.1:java (default-cli) @ yourapp ---
-11:39:45.355 [Main.main()] INFO c.d.o.d.i.c.DefaultMavenCoordinates - DataStax Java driver for Apache Cassandra(R) (com.datastax.oss:java-driver-core) version 4.0.1
+11:39:45.355 [Main.main()] INFO c.d.o.d.i.c.DefaultMavenCoordinates - Apache Cassandra Java Driver (com.datastax.oss:java-driver-core) version 4.0.1
11:39:45.648 [poc-admin-0] INFO c.d.o.d.internal.core.time.Clock - Using native clock for microsecond precision
11:39:45.649 [poc-admin-0] INFO c.d.o.d.i.c.metadata.MetadataManager - [poc] No contact points provided, defaulting to /127.0.0.1:9042
3.11.2
@@ -307,7 +326,7 @@ $ ./gradlew execute
:processResources
:classes
:execute
-13:32:25.339 [main] INFO c.d.o.d.i.c.DefaultMavenCoordinates - DataStax Java driver for Apache Cassandra(R) (com.datastax.oss:java-driver-core) version 4.0.1-alpha4-SNAPSHOT
+13:32:25.339 [main] INFO c.d.o.d.i.c.DefaultMavenCoordinates - Apache Cassandra Java Driver (com.datastax.oss:java-driver-core) version 4.0.1-alpha4-SNAPSHOT
13:32:25.682 [poc-admin-0] INFO c.d.o.d.internal.core.time.Clock - Using native clock for microsecond precision
13:32:25.683 [poc-admin-0] INFO c.d.o.d.i.c.metadata.MetadataManager - [poc] No contact points provided, defaulting to /127.0.0.1:9042
3.11.2
@@ -355,7 +374,7 @@ In that case, you can exclude the dependency:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -383,7 +402,7 @@ are not available on your platform, you can exclude the following dependency:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -397,7 +416,7 @@ are not available on your platform, you can exclude the following dependency:
#### Compression libraries
-The driver supports compression with either [LZ4](https://github.com/jpountz/lz4-java) or
+The driver supports compression with either [LZ4](https://github.com/yawkat/lz4-java) or
[Snappy](http://google.github.io/snappy/).
These dependencies are optional; you have to add them explicitly in your application in order to
@@ -414,7 +433,7 @@ your application, then you can remove the dependency:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -437,7 +456,7 @@ dependency:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -462,7 +481,7 @@ don't use any of the above features, you can safely exclude the dependency:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -485,7 +504,7 @@ anywhere in your application you can exclude the dependency:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -525,7 +544,7 @@ you can exclude the TinkerPop dependencies:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -562,6 +581,8 @@ Here are the recommended TinkerPop versions for each driver version:
Driver version TinkerPop version
+4.17.0 3.5.3
+4.16.0 3.5.3
4.15.0 3.5.3
4.14.1 3.5.3
4.14.0 3.4.10
@@ -587,7 +608,7 @@ without it. If you never call any of the `executeReactive` methods, you can excl
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
@@ -608,25 +629,22 @@ The driver team uses annotations to document certain aspects of the code:
* nullability with [SpotBugs](https://spotbugs.github.io/) annotations `@Nullable` and `@NonNull`.
This is mostly used during development; while these annotations are retained in class files, they
-serve no purpose at runtime. If you want to minimize the number of JARs in your classpath, you can
-exclude them:
+serve no purpose at runtime. This class is an optional dependency of the driver. If you wish to
+make use of these annotations in your own code you have to explicitly depend on these jars:
```xml
-
- com.datastax.oss
- java-driver-core
- ${driver.version}
-
-
- com.github.stephenc.jcip
- jcip-annotations
-
-
- com.github.spotbugs
- spotbugs-annotations
-
-
-
+
+
+ com.github.stephenc.jcip
+ jcip-annotations
+ 1.0-1
+
+
+ com.github.spotbugs
+ spotbugs-annotations
+ 3.1.12
+
+
```
However, there is one case when excluding those dependencies won't work: if you use [annotation
@@ -653,7 +671,7 @@ The remaining core driver dependencies are the only ones that are truly mandator
* the [native protocol](https://github.com/datastax/native-protocol) layer. This is essentially part
of the driver code, but was externalized for reuse in other projects;
-* `java-driver-shaded-guava`, a shaded version of [Guava](https://github.com/google/guava). It is
+* `java-driver-guava-shaded`, a shaded version of [Guava](https://github.com/google/guava). It is
relocated to a different package, and only used by internal driver code, so it should be
completely transparent to third-party code;
* the [SLF4J](https://www.slf4j.org/) API for [logging](../logging/).
@@ -665,6 +683,6 @@ The remaining core driver dependencies are the only ones that are truly mandator
[guava]: https://github.com/google/guava/issues/2721
[annotation processing]: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#sthref65
-[Session.getMetrics]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Session.html#getMetrics--
-[SessionBuilder.addContactPoint]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addContactPoint-java.net.InetSocketAddress-
-[Uuids]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/uuid/Uuids.html
+[Session.getMetrics]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Session.html#getMetrics--
+[SessionBuilder.addContactPoint]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addContactPoint-java.net.InetSocketAddress-
+[Uuids]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/uuid/Uuids.html
diff --git a/manual/core/load_balancing/README.md b/manual/core/load_balancing/README.md
index abc950fe378..3f391c14f56 100644
--- a/manual/core/load_balancing/README.md
+++ b/manual/core/load_balancing/README.md
@@ -1,3 +1,22 @@
+
+
## Load balancing
### Quick overview
@@ -426,12 +445,12 @@ Then it uses the "closest" distance for any given node. For example:
* policy1 changes its suggestion to IGNORED. node1 is set to REMOTE;
* policy1 changes its suggestion to REMOTE. node1 stays at REMOTE.
-[DriverContext]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/context/DriverContext.html
-[LoadBalancingPolicy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/loadbalancing/LoadBalancingPolicy.html
+[DriverContext]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/context/DriverContext.html
+[LoadBalancingPolicy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/loadbalancing/LoadBalancingPolicy.html
[BasicLoadBalancingPolicy]: https://github.com/datastax/java-driver/blob/4.x/core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/BasicLoadBalancingPolicy.java
-[getRoutingKeyspace()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Request.html#getRoutingKeyspace--
-[getRoutingToken()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Request.html#getRoutingToken--
-[getRoutingKey()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Request.html#getRoutingKey--
-[NodeDistanceEvaluator]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/loadbalancing/NodeDistanceEvaluator.html
+[getRoutingKeyspace()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Request.html#getRoutingKeyspace--
+[getRoutingToken()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Request.html#getRoutingToken--
+[getRoutingKey()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Request.html#getRoutingKey--
+[NodeDistanceEvaluator]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/loadbalancing/NodeDistanceEvaluator.html
[`nodetool status`]: https://docs.datastax.com/en/dse/6.7/dse-dev/datastax_enterprise/tools/nodetool/toolsStatus.html
[cqlsh]: https://docs.datastax.com/en/dse/6.7/cql/cql/cql_using/startCqlshStandalone.html
diff --git a/manual/core/logging/README.md b/manual/core/logging/README.md
index ff0ee5303b6..e3f8bfa7777 100644
--- a/manual/core/logging/README.md
+++ b/manual/core/logging/README.md
@@ -1,3 +1,22 @@
+
+
## Logging
### Quick overview
@@ -215,4 +234,4 @@ console).
[SLF4J]: https://www.slf4j.org/
[binding]: https://www.slf4j.org/manual.html#swapping
[Logback]: http://logback.qos.ch
-[Log4J]: https://logging.apache.org/log4j
\ No newline at end of file
+[Log4J]: https://logging.apache.org/log4j
diff --git a/manual/core/metadata/README.md b/manual/core/metadata/README.md
index 34358bfdf5e..73609ee0542 100644
--- a/manual/core/metadata/README.md
+++ b/manual/core/metadata/README.md
@@ -1,3 +1,22 @@
+
+
## Metadata
### Quick overview
@@ -56,6 +75,6 @@ new keyspace in the schema metadata before the token metadata was updated.
Schema and node state events are debounced. This allows you to control how often the metadata gets
refreshed. See the [Performance](../performance/#debouncing) page for more details.
-[Session#getMetadata]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Session.html#getMetadata--
-[Metadata]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Metadata.html
-[Node]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html
\ No newline at end of file
+[Session#getMetadata]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Session.html#getMetadata--
+[Metadata]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Metadata.html
+[Node]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html
diff --git a/manual/core/metadata/node/README.md b/manual/core/metadata/node/README.md
index ae66a468fd3..fea04e5f262 100644
--- a/manual/core/metadata/node/README.md
+++ b/manual/core/metadata/node/README.md
@@ -1,3 +1,22 @@
+
+
## Node metadata
### Quick overview
@@ -129,17 +148,17 @@ beyond the scope of this document; if you're interested, study the `TopologyMoni
the source code.
-[Metadata#getNodes]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Metadata.html#getNodes--
-[Node]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html
-[Node#getState()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#getState--
-[Node#getDatacenter()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#getDatacenter--
-[Node#getRack()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#getRack--
-[Node#getDistance()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#getDistance--
-[Node#getExtras()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#getExtras--
-[Node#getOpenConnections()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#getOpenConnections--
-[Node#isReconnecting()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Node.html#isReconnecting--
-[NodeState]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/NodeState.html
-[NodeStateListener]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/NodeStateListener.html
-[NodeStateListenerBase]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/NodeStateListenerBase.html
-[SessionBuilder.addNodeStateListener]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addNodeStateListener-com.datastax.oss.driver.api.core.metadata.NodeStateListener-
-[DseNodeProperties]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/metadata/DseNodeProperties.html
+[Metadata#getNodes]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Metadata.html#getNodes--
+[Node]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html
+[Node#getState()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#getState--
+[Node#getDatacenter()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#getDatacenter--
+[Node#getRack()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#getRack--
+[Node#getDistance()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#getDistance--
+[Node#getExtras()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#getExtras--
+[Node#getOpenConnections()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#getOpenConnections--
+[Node#isReconnecting()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Node.html#isReconnecting--
+[NodeState]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/NodeState.html
+[NodeStateListener]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/NodeStateListener.html
+[NodeStateListenerBase]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/NodeStateListenerBase.html
+[SessionBuilder.addNodeStateListener]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addNodeStateListener-com.datastax.oss.driver.api.core.metadata.NodeStateListener-
+[DseNodeProperties]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/metadata/DseNodeProperties.html
diff --git a/manual/core/metadata/schema/README.md b/manual/core/metadata/schema/README.md
index c42e56e5735..20521d1def4 100644
--- a/manual/core/metadata/schema/README.md
+++ b/manual/core/metadata/schema/README.md
@@ -1,3 +1,22 @@
+
+
## Schema metadata
### Quick overview
@@ -321,16 +340,16 @@ unavailable for the excluded keyspaces.
If you issue schema-altering requests from the driver (e.g. `session.execute("CREATE TABLE ..")`),
take a look at the [Performance](../../performance/#schema-updates) page for a few tips.
-[Metadata#getKeyspaces]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Metadata.html#getKeyspaces--
-[SchemaChangeListener]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/schema/SchemaChangeListener.html
-[SchemaChangeListenerBase]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/schema/SchemaChangeListenerBase.html
-[Session#setSchemaMetadataEnabled]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Session.html#setSchemaMetadataEnabled-java.lang.Boolean-
-[Session#checkSchemaAgreementAsync]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Session.html#checkSchemaAgreementAsync--
-[SessionBuilder#addSchemaChangeListener]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addSchemaChangeListener-com.datastax.oss.driver.api.core.metadata.schema.SchemaChangeListener-
-[ExecutionInfo#isSchemaInAgreement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#isSchemaInAgreement--
-[com.datastax.dse.driver.api.core.metadata.schema]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/metadata/schema/package-frame.html
-[DseFunctionMetadata]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/metadata/schema/DseFunctionMetadata.html
-[DseAggregateMetadata]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/metadata/schema/DseAggregateMetadata.html
+[Metadata#getKeyspaces]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Metadata.html#getKeyspaces--
+[SchemaChangeListener]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/schema/SchemaChangeListener.html
+[SchemaChangeListenerBase]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/schema/SchemaChangeListenerBase.html
+[Session#setSchemaMetadataEnabled]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Session.html#setSchemaMetadataEnabled-java.lang.Boolean-
+[Session#checkSchemaAgreementAsync]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Session.html#checkSchemaAgreementAsync--
+[SessionBuilder#addSchemaChangeListener]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addSchemaChangeListener-com.datastax.oss.driver.api.core.metadata.schema.SchemaChangeListener-
+[ExecutionInfo#isSchemaInAgreement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#isSchemaInAgreement--
+[com.datastax.dse.driver.api.core.metadata.schema]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/metadata/schema/package-frame.html
+[DseFunctionMetadata]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/metadata/schema/DseFunctionMetadata.html
+[DseAggregateMetadata]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/metadata/schema/DseAggregateMetadata.html
[JAVA-750]: https://datastax-oss.atlassian.net/browse/JAVA-750
[java.util.regex.Pattern]: https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
diff --git a/manual/core/metadata/token/README.md b/manual/core/metadata/token/README.md
index 475274fd4e4..4d7cd9252df 100644
--- a/manual/core/metadata/token/README.md
+++ b/manual/core/metadata/token/README.md
@@ -1,3 +1,22 @@
+
+
## Token metadata
### Quick overview
@@ -169,5 +188,5 @@ on [schema metadata](../schema/). If schema metadata is disabled or filtered, to
also be unavailable for the excluded keyspaces.
-[Metadata#getTokenMap]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/Metadata.html#getTokenMap--
-[TokenMap]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/TokenMap.html
\ No newline at end of file
+[Metadata#getTokenMap]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/Metadata.html#getTokenMap--
+[TokenMap]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/TokenMap.html
diff --git a/manual/core/metrics/README.md b/manual/core/metrics/README.md
index 65a93eb1fbf..ef5d9b453f0 100644
--- a/manual/core/metrics/README.md
+++ b/manual/core/metrics/README.md
@@ -1,3 +1,22 @@
+
+
## Metrics
### Quick overview
@@ -37,7 +56,7 @@ module contains the actual bindings for Micrometer, and depends itself on the Mi
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-metrics-micrometer
${driver.version}
@@ -48,7 +67,7 @@ driver, because they are not relevant when using Micrometer:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
@@ -81,7 +100,7 @@ library:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-metrics-microprofile
${driver.version}
@@ -92,7 +111,7 @@ driver, because they are not relevant when using MicroProfile Metrics:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
@@ -346,4 +365,4 @@ CSV files, SLF4J logs and Graphite. Refer to their [manual][Dropwizard manual] f
[Micrometer Metrics]: https://micrometer.io/docs
[Micrometer JMX]: https://micrometer.io/docs/registry/jmx
[MicroProfile Metrics]: https://github.com/eclipse/microprofile-metrics
-[reference configuration]: ../configuration/reference/
\ No newline at end of file
+[reference configuration]: ../configuration/reference/
diff --git a/manual/core/native_protocol/README.md b/manual/core/native_protocol/README.md
index d64aaccda85..42146e63f42 100644
--- a/manual/core/native_protocol/README.md
+++ b/manual/core/native_protocol/README.md
@@ -1,3 +1,22 @@
+
+
## Native protocol
### Quick overview
@@ -21,21 +40,18 @@ only available with specific protocol versions.
### Compatibility matrix
-Java driver 4 supports protocol versions 3 to 5. By default, the version is negotiated with the
+Java Driver 4 supports protocol versions 3 to 5. By default, the version is negotiated with the
first node the driver connects to:
-| Cassandra version | Negotiated protocol version with driver 4 ¹ |
-|---------------------|-------------------------------------------------|
-| 2.1.x | v3 |
-| 2.2.x | v4 |
-| 3.x | v4 |
-| 4.x ² | v5 |
+| Cassandra version | Negotiated protocol version with driver 4 ¹ |
+|-------------------|-------------------------------------------------|
+| 2.1.x | v3 |
+| 2.2.x | v4 |
+| 3.x | v4 |
+| 4.x | v5 |
*(1) for previous driver versions, see the [3.x documentation][driver3]*
-*(2) at the time of writing, Cassandra 4 is not released yet. Protocol v5 support is still in beta,
-and must be enabled explicitly (negotiation will yield v4).*
-
Since version 4.5.0, the driver can also use DSE protocols when all nodes are running a version of
DSE. The table below shows the protocol matrix for these cases:
@@ -43,10 +59,10 @@ DSE. The table below shows the protocol matrix for these cases:
|---------------------|-------------------------------------------------|
| 4.7/4.8 | v3 |
| 5.0 | v4 |
-| 5.1 | DSE_V1 ³ |
-| 6.0/6.7/6.8 | DSE_V2 ³ |
+| 5.1 | DSE_V1 ² |
+| 6.0/6.7/6.8 | DSE_V2 ² |
-*(3) DSE Protocols are chosen before other Cassandra native protocols.*
+*(2) DSE Protocols are chosen before other Cassandra native protocols.*
### Controlling the protocol version
@@ -62,11 +78,14 @@ the [configuration](../configuration/):
```
datastax-java-driver {
advanced.protocol {
- version = v3
+ version = V3
}
}
```
+Note that the protocol version you specify above is case sensitive so make sure to only use uppercase letters.
+"V3" is correct, "v3" is not.
+
If you force a version that is too high for the server, you'll get an error:
```
@@ -135,6 +154,6 @@ If you want to see the details of mixed cluster negotiation, enable `DEBUG` leve
[protocol spec]: https://github.com/datastax/native-protocol/tree/1.x/src/main/resources
[driver3]: https://docs.datastax.com/en/developer/java-driver/3.10/manual/native_protocol/
-[ExecutionInfo.getWarnings]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getWarnings--
-[Request.getCustomPayload]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Request.html#getCustomPayload--
-[AttachmentPoint.getProtocolVersion]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/detach/AttachmentPoint.html#getProtocolVersion--
+[ExecutionInfo.getWarnings]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getWarnings--
+[Request.getCustomPayload]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Request.html#getCustomPayload--
+[AttachmentPoint.getProtocolVersion]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/detach/AttachmentPoint.html#getProtocolVersion--
diff --git a/manual/core/non_blocking/README.md b/manual/core/non_blocking/README.md
index 0960379936b..f320ffd13d2 100644
--- a/manual/core/non_blocking/README.md
+++ b/manual/core/non_blocking/README.md
@@ -1,3 +1,22 @@
+
+
## Non-blocking programming
### Quick overview
@@ -11,7 +30,7 @@ such as [Vert.x] or [Reactor], along with tools for automatic detection of block
[Reactor]: https://projectreactor.io
[BlockHound]: https://github.com/reactor/BlockHound
-**In summary, when used properly, the DataStax Java driver offers non-blocking guarantees for most
+**In summary, when used properly, the Java Driver offers non-blocking guarantees for most
of its operations, and during most of the session lifecycle.**
These guarantees and their exceptions are detailed below. A final chapter explains how to use the
@@ -49,22 +68,22 @@ For example, calling any synchronous method declared in [`SyncCqlSession`], such
will block until the result is available. These methods should never be used in non-blocking
applications.
-[`SyncCqlSession`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/SyncCqlSession.html`
-[`execute`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/SyncCqlSession.html#execute-com.datastax.oss.driver.api.core.cql.Statement-
+[`SyncCqlSession`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/SyncCqlSession.html`
+[`execute`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/SyncCqlSession.html#execute-com.datastax.oss.driver.api.core.cql.Statement-
However, the asynchronous methods declared in [`AsyncCqlSession`], such as [`executeAsync`], are all
safe for use in non-blocking applications; the statement execution and asynchronous result delivery
is guaranteed to never block.
-[`AsyncCqlSession`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncCqlSession.html
-[`executeAsync`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncCqlSession.html#executeAsync-com.datastax.oss.driver.api.core.cql.Statement-
+[`AsyncCqlSession`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncCqlSession.html
+[`executeAsync`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncCqlSession.html#executeAsync-com.datastax.oss.driver.api.core.cql.Statement-
The same applies to the methods declared in [`ReactiveSession`] such as [`executeReactive`]: the
returned publisher will never block when subscribed to, until the final results are delivered to
the subscriber.
-[`ReactiveSession`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveSession.html
-[`executeReactive`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveSession.html#executeReactive-com.datastax.oss.driver.api.core.cql.Statement-
+[`ReactiveSession`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveSession.html
+[`executeReactive`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveSession.html#executeReactive-com.datastax.oss.driver.api.core.cql.Statement-
There is one exception though: continuous paging queries (a feature specific to DSE) have a special
execution model which uses internal locks for coordination. Although such locks are only held for
@@ -77,10 +96,10 @@ reactive APIs like [`executeContinuouslyAsync`] and [`executeContinuouslyReactiv
though, continuous paging is extremely efficient and can safely be used in most non-blocking
contexts, unless they require strict lock-freedom.
-[`ContinuousSession`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/continuous/ContinuousSession.html
-[`ContinuousReactiveSession`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousReactiveSession.html
-[`executeContinuouslyAsync`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/continuous/ContinuousSession.html#executeContinuouslyAsync-com.datastax.oss.driver.api.core.cql.Statement-
-[`executeContinuouslyReactive`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousReactiveSession.html#executeContinuouslyReactive-com.datastax.oss.driver.api.core.cql.Statement-
+[`ContinuousSession`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/continuous/ContinuousSession.html
+[`ContinuousReactiveSession`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousReactiveSession.html
+[`executeContinuouslyAsync`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/continuous/ContinuousSession.html#executeContinuouslyAsync-com.datastax.oss.driver.api.core.cql.Statement-
+[`executeContinuouslyReactive`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/continuous/reactive/ContinuousReactiveSession.html#executeContinuouslyReactive-com.datastax.oss.driver.api.core.cql.Statement-
#### Driver lock-free guarantees per session lifecycle phases
@@ -110,8 +129,8 @@ Similarly, a call to [`SessionBuilder.build()`] should be considered blocking as
calling thread and wait until the method returns. For this reason, calls to `SessionBuilder.build()`
should be avoided in non-blocking applications.
-[`SessionBuilder.buildAsync()`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#buildAsync--
-[`SessionBuilder.build()`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#build--
+[`SessionBuilder.buildAsync()`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#buildAsync--
+[`SessionBuilder.build()`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#build--
Once the session is initialized, however, the driver is guaranteed to be non-blocking during the
session's lifecycle, and under normal operation, unless otherwise noted elsewhere in this document.
@@ -121,8 +140,8 @@ during that phase. Therefore, calls to any method declared in [`AsyncAutoCloseab
asynchronous ones like [`closeAsync()`], should also be preferably deferred until the application is
shut down and lock-freedom enforcement is disabled.
-[`AsyncAutoCloseable`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/AsyncAutoCloseable.html
-[`closeAsync()`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/AsyncAutoCloseable.html#closeAsync--
+[`AsyncAutoCloseable`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/AsyncAutoCloseable.html
+[`closeAsync()`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/AsyncAutoCloseable.html#closeAsync--
#### Driver lock-free guarantees for specific components
@@ -131,19 +150,17 @@ Certain driver components are not implemented in lock-free algorithms.
For example, [`SafeInitNodeStateListener`] is implemented with internal locks for coordination. It
should not be used if strict lock-freedom is enforced.
-[`SafeInitNodeStateListener`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/metadata/SafeInitNodeStateListener.html
-
-The same is valid for both built-in [request throttlers]:
+[`SafeInitNodeStateListener`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/SafeInitNodeStateListener.html
-* `ConcurrencyLimitingRequestThrottler`
-* `RateLimitingRequestThrottler`
+The `RateLimitingRequestThrottler` is currently blocking. The `ConcurrencyLimitingRequestThrottler`
+is lock-free.
-See the section about [throttling](../throttling) for details about these components. Again, they
-use locks internally, and depending on how many requests are being executed in parallel, the thread
-contention on these locks can be high: in short, if your application enforces strict lock-freedom,
-then these components should not be used.
+See the section about [throttling](../throttling) for details about these components. Depending on
+how many requests are being executed in parallel, the thread contention on these locks can be high:
+in short, if your application enforces strict lock-freedom, then you should not use the
+`RateLimitingRequestThrottler`.
-[request throttlers]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/throttling/RequestThrottler.html
+[request throttlers]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/throttling/RequestThrottler.html
Other components may be lock-free, *except* for their first invocation. This is the case of the
following items:
@@ -151,8 +168,8 @@ following items:
* All built-in implementations of [`TimestampGenerator`], upon instantiation;
* The utility method [`Uuids.timeBased()`].
-[`TimestampGenerator`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/time/TimestampGenerator.html
-[`Uuids.timeBased()`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/uuid/Uuids.html#timeBased--
+[`TimestampGenerator`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/time/TimestampGenerator.html
+[`Uuids.timeBased()`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/uuid/Uuids.html#timeBased--
Both components need to access native libraries when they get initialized and this may involve
hitting the local filesystem, thus causing the initialization to become a blocking call.
@@ -172,7 +189,7 @@ One component, the codec registry, can block when its [`register`] method is cal
therefore advised that codecs should be registered during application startup exclusively. See the
[custom codecs](../custom_codecs) section for more details about registering codecs.
-[`register`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/registry/MutableCodecRegistry.html#register-com.datastax.oss.driver.api.core.type.codec.TypeCodec-
+[`register`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/registry/MutableCodecRegistry.html#register-com.datastax.oss.driver.api.core.type.codec.TypeCodec-
Finally, a few internal components also use locks, but only during session initialization; once the
session is ready, they are either discarded, or don't use locks anymore for the rest of the
@@ -213,7 +230,7 @@ lock-freedom enforcement tools could report calls to that method, but it was imp
these calls. Thanks to [JAVA-2449], released with driver 4.10.0, `Uuids.random()` became a
non-blocking call and random UUIDs can now be safely generated in non-blocking applications.
-[`Uuids.random()`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/uuid/Uuids.html#random--
+[`Uuids.random()`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/uuid/Uuids.html#random--
[JAVA-2449]: https://datastax-oss.atlassian.net/browse/JAVA-2449
#### Driver lock-free guarantees when reloading the configuration
@@ -228,8 +245,8 @@ detectors. If that is the case, it is advised to disable hot-reloading by settin
`datastax-java-driver.basic.config-reload-interval` option to 0. See the manual page on
[configuration](../configuration) for more information.
-[`DriverConfigLoader`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html
-[hot-reloading]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#supportsReloading--
+[`DriverConfigLoader`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html
+[hot-reloading]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#supportsReloading--
#### Driver lock-free guarantees when connecting to DSE
diff --git a/manual/core/paging/README.md b/manual/core/paging/README.md
index d08d92e8f36..2df92bd69d1 100644
--- a/manual/core/paging/README.md
+++ b/manual/core/paging/README.md
@@ -1,3 +1,22 @@
+
+
## Paging
### Quick overview
@@ -253,12 +272,12 @@ protocol page size and the logical page size to the same value.
The [driver examples] include two complete web service implementations demonstrating forward-only
and offset paging.
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
-[AsyncPagingIterable.hasMorePages]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/AsyncPagingIterable.html#hasMorePages--
-[AsyncPagingIterable.fetchNextPage]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/AsyncPagingIterable.html#fetchNextPage--
-[OffsetPager]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/paging/OffsetPager.html
-[PagingState]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/PagingState.html
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
+[AsyncPagingIterable.hasMorePages]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/AsyncPagingIterable.html#hasMorePages--
+[AsyncPagingIterable.fetchNextPage]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/AsyncPagingIterable.html#fetchNextPage--
+[OffsetPager]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/paging/OffsetPager.html
+[PagingState]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/PagingState.html
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
diff --git a/manual/core/performance/README.md b/manual/core/performance/README.md
index 90b379c59d6..3afb321968e 100644
--- a/manual/core/performance/README.md
+++ b/manual/core/performance/README.md
@@ -1,3 +1,22 @@
+
+
## Performance
This page is intended as a checklist for everything related to driver performance. Most of the
@@ -345,8 +364,8 @@ possible to reuse the same event loop group for I/O, admin tasks, and even your
(the driver's internal code is fully asynchronous so it will never block any thread). The timer is
the only one that will have to stay on a separate thread.
-[AccessibleByName]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/AccessibleByName.html
-[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlIdentifier.html
-[CqlSession.prepare(SimpleStatement)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlSession.html#prepare-com.datastax.oss.driver.api.core.cql.SimpleStatement-
-[GenericType]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
-[Statement.setNode()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Statement.html#setNode-com.datastax.oss.driver.api.core.metadata.Node-
\ No newline at end of file
+[AccessibleByName]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/AccessibleByName.html
+[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlIdentifier.html
+[CqlSession.prepare(SimpleStatement)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlSession.html#prepare-com.datastax.oss.driver.api.core.cql.SimpleStatement-
+[GenericType]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
+[Statement.setNode()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Statement.html#setNode-com.datastax.oss.driver.api.core.metadata.Node-
diff --git a/manual/core/pooling/README.md b/manual/core/pooling/README.md
index d0d2de7d128..578de6b4abd 100644
--- a/manual/core/pooling/README.md
+++ b/manual/core/pooling/README.md
@@ -1,3 +1,22 @@
+
+
## Connection pooling
### Quick overview
@@ -170,5 +189,5 @@ you experience the issue, here's what to look out for:
Try adding more connections per node. Thanks to the driver's hot-reload mechanism, you can do that
at runtime and see the effects immediately.
-[CqlSession]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlSession.html
-[CASSANDRA-8086]: https://issues.apache.org/jira/browse/CASSANDRA-8086
\ No newline at end of file
+[CqlSession]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlSession.html
+[CASSANDRA-8086]: https://issues.apache.org/jira/browse/CASSANDRA-8086
diff --git a/manual/core/query_timestamps/README.md b/manual/core/query_timestamps/README.md
index bc01ce41d4d..4498afe21c4 100644
--- a/manual/core/query_timestamps/README.md
+++ b/manual/core/query_timestamps/README.md
@@ -1,3 +1,22 @@
+
+
## Query timestamps
### Quick overview
@@ -187,9 +206,9 @@ Here is the order of precedence of all the methods described so far:
3. otherwise, if the timestamp generator assigned a timestamp, use it;
4. otherwise, let the server assign the timestamp.
-[TimestampGenerator]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/time/TimestampGenerator.html
+[TimestampGenerator]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/time/TimestampGenerator.html
[gettimeofday]: http://man7.org/linux/man-pages/man2/settimeofday.2.html
[JNR]: https://github.com/jnr/jnr-posix
[Lightweight transactions]: https://docs.datastax.com/en/dse/6.0/cql/cql/cql_using/useInsertLWT.html
-[Statement.setQueryTimestamp()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Statement.html#setQueryTimestamp-long-
+[Statement.setQueryTimestamp()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Statement.html#setQueryTimestamp-long-
diff --git a/manual/core/reactive/README.md b/manual/core/reactive/README.md
index 6073ac4bf98..37a2e3411b8 100644
--- a/manual/core/reactive/README.md
+++ b/manual/core/reactive/README.md
@@ -1,3 +1,22 @@
+
+
## Reactive Style Programming
The driver provides built-in support for reactive queries. The [CqlSession] interface extends
@@ -367,18 +386,18 @@ Note that the driver already has a [built-in retry mechanism] that can transpare
queries; the above example should be seen as a demonstration of application-level retries, when a
more fine-grained control of what should be retried, and how, is required.
-[CqlSession]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlSession.html
-[ReactiveSession]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveSession.html
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
-[ReactiveRow]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html
-[Row]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Row.html
-[getColumnDefinitions]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html#getColumnDefinitions--
-[getExecutionInfos]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html#getExecutionInfos--
-[wasApplied]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html#wasApplied--
-[ReactiveRow.getColumnDefinitions]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html#getColumnDefinitions--
-[ReactiveRow.getExecutionInfo]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html#getExecutionInfo--
-[ReactiveRow.wasApplied]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html#wasApplied--
+[CqlSession]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlSession.html
+[ReactiveSession]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveSession.html
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
+[ReactiveRow]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html
+[Row]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Row.html
+[getColumnDefinitions]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html#getColumnDefinitions--
+[getExecutionInfos]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html#getExecutionInfos--
+[wasApplied]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html#wasApplied--
+[ReactiveRow.getColumnDefinitions]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html#getColumnDefinitions--
+[ReactiveRow.getExecutionInfo]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html#getExecutionInfo--
+[ReactiveRow.wasApplied]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveRow.html#wasApplied--
[built-in retry mechanism]: ../retries/
[request throttling]: ../throttling/
diff --git a/manual/core/reconnection/README.md b/manual/core/reconnection/README.md
index c383b887fcc..3eb6dad9c05 100644
--- a/manual/core/reconnection/README.md
+++ b/manual/core/reconnection/README.md
@@ -1,3 +1,22 @@
+
+
## Reconnection
### Quick overview
@@ -84,7 +103,7 @@ Note that the session is not accessible until it is fully ready: the `CqlSession
call — or the future returned by `buildAsync()` — will not complete until the connection
was established.
-[ConstantReconnectionPolicy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/internal/core/connection/ConstantReconnectionPolicy.html
-[DriverContext]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/context/DriverContext.html
-[ExponentialReconnectionPolicy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/internal/core/connection/ExponentialReconnectionPolicy.html
-[ReconnectionPolicy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/connection/ReconnectionPolicy.html
\ No newline at end of file
+[ConstantReconnectionPolicy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/internal/core/connection/ConstantReconnectionPolicy.html
+[DriverContext]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/context/DriverContext.html
+[ExponentialReconnectionPolicy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/internal/core/connection/ExponentialReconnectionPolicy.html
+[ReconnectionPolicy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/connection/ReconnectionPolicy.html
diff --git a/manual/core/request_id/README.md b/manual/core/request_id/README.md
new file mode 100644
index 00000000000..a766a4419af
--- /dev/null
+++ b/manual/core/request_id/README.md
@@ -0,0 +1,48 @@
+
+
+## Request Id
+
+### Quick overview
+
+Users can inject an identifier for each individual CQL request, and such ID can be written in to the [custom payload](https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec) to
+correlate a request across the driver and the Apache Cassandra server.
+
+A request ID generator needs to generate both:
+- Session request ID: an identifier for an entire session.execute() call
+- Node request ID: an identifier for the execution of a CQL statement against a particular node. There can be one or more node requests for a single session request, due to retries or speculative executions.
+
+Usage:
+* Inject ID generator: set the desired `RequestIdGenerator` in `advanced.request-id.generator.class`.
+* Add ID to custom payload: the default behavior of a `RequestIdGenerator` is to add the request ID into the custom payload with the key `request-id`. Override `RequestIdGenerator.getDecoratedStatement` to customize the behavior.
+
+### Request Id Generator Configuration
+
+Request ID generator can be declared in the [configuration](../configuration/) as follows:
+
+```
+datastax-java-driver.advanced.request-id.generator {
+ class = com.example.app.MyGenerator
+}
+```
+
+To register your own request ID generator, specify the name of the class
+that implements `RequestIdGenerator`.
+
+The generated ID will be added to the log message of `CqlRequestHandler`, and propagated to other classes, e.g. the request trackers.
\ No newline at end of file
diff --git a/manual/core/request_tracker/README.md b/manual/core/request_tracker/README.md
index 4186139c0ba..c135abfe53f 100644
--- a/manual/core/request_tracker/README.md
+++ b/manual/core/request_tracker/README.md
@@ -1,3 +1,22 @@
+
+
## Request tracker
### Quick overview
@@ -123,5 +142,5 @@ all FROM users WHERE user_id=? [v0=42]
com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Undefined column name all
```
-[RequestTracker]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/tracker/RequestTracker.html
-[SessionBuilder.addRequestTracker]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addRequestTracker-com.datastax.oss.driver.api.core.tracker.RequestTracker-
\ No newline at end of file
+[RequestTracker]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/tracker/RequestTracker.html
+[SessionBuilder.addRequestTracker]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#addRequestTracker-com.datastax.oss.driver.api.core.tracker.RequestTracker-
diff --git a/manual/core/retries/README.md b/manual/core/retries/README.md
index 6e150eb77e4..e92f8e214aa 100644
--- a/manual/core/retries/README.md
+++ b/manual/core/retries/README.md
@@ -1,3 +1,22 @@
+
+
## Retries
### Quick overview
@@ -231,21 +250,21 @@ configuration).
Each request uses its declared profile's policy. If it doesn't declare any profile, or if the
profile doesn't have a dedicated policy, then the default profile's policy is used.
-[AllNodesFailedException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/AllNodesFailedException.html
-[ClosedConnectionException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/connection/ClosedConnectionException.html
-[DriverTimeoutException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/DriverTimeoutException.html
-[FunctionFailureException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/FunctionFailureException.html
-[HeartbeatException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/connection/HeartbeatException.html
-[ProtocolError]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/ProtocolError.html
-[OverloadedException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/OverloadedException.html
-[QueryValidationException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/QueryValidationException.html
-[ReadFailureException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/ReadFailureException.html
-[ReadTimeoutException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/ReadTimeoutException.html
-[RetryDecision]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/retry/RetryDecision.html
-[RetryPolicy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/retry/RetryPolicy.html
-[RetryVerdict]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/retry/RetryVerdict.html
-[ServerError]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/ServerError.html
-[TruncateException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/TruncateException.html
-[UnavailableException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/UnavailableException.html
-[WriteFailureException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/WriteFailureException.html
-[WriteTimeoutException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/servererrors/WriteTimeoutException.html
+[AllNodesFailedException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/AllNodesFailedException.html
+[ClosedConnectionException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/connection/ClosedConnectionException.html
+[DriverTimeoutException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/DriverTimeoutException.html
+[FunctionFailureException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/FunctionFailureException.html
+[HeartbeatException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/connection/HeartbeatException.html
+[ProtocolError]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/ProtocolError.html
+[OverloadedException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/OverloadedException.html
+[QueryValidationException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/QueryValidationException.html
+[ReadFailureException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/ReadFailureException.html
+[ReadTimeoutException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/ReadTimeoutException.html
+[RetryDecision]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/retry/RetryDecision.html
+[RetryPolicy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/retry/RetryPolicy.html
+[RetryVerdict]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/retry/RetryVerdict.html
+[ServerError]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/ServerError.html
+[TruncateException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/TruncateException.html
+[UnavailableException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/UnavailableException.html
+[WriteFailureException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/WriteFailureException.html
+[WriteTimeoutException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/servererrors/WriteTimeoutException.html
diff --git a/manual/core/shaded_jar/README.md b/manual/core/shaded_jar/README.md
index 2f52e44c6a4..8e183c0efb5 100644
--- a/manual/core/shaded_jar/README.md
+++ b/manual/core/shaded_jar/README.md
@@ -1,3 +1,22 @@
+
+
## Using the shaded JAR
The default `java-driver-core` JAR depends on a number of [third party
@@ -10,7 +29,7 @@ dependency to `java-driver-core` by:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core-shaded
${driver.version}
@@ -21,18 +40,18 @@ you need to remove its dependency to the non-shaded JAR:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core-shaded
${driver.version}
- com.datastax.oss
+ org.apache.cassandra
java-driver-query-builder
${driver.version}
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
@@ -51,7 +70,7 @@ Notes:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${driver.version}
diff --git a/manual/core/speculative_execution/README.md b/manual/core/speculative_execution/README.md
index cf6675e9dbf..5666d6a1363 100644
--- a/manual/core/speculative_execution/README.md
+++ b/manual/core/speculative_execution/README.md
@@ -1,3 +1,22 @@
+
+
## Speculative query execution
### Quick overview
@@ -250,4 +269,4 @@ profiles have the same configuration).
Each request uses its declared profile's policy. If it doesn't declare any profile, or if the
profile doesn't have a dedicated policy, then the default profile's policy is used.
-[SpeculativeExecutionPolicy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/specex/SpeculativeExecutionPolicy.html
\ No newline at end of file
+[SpeculativeExecutionPolicy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/specex/SpeculativeExecutionPolicy.html
diff --git a/manual/core/ssl/README.md b/manual/core/ssl/README.md
index 2e293d7e346..913c7bc6c9a 100644
--- a/manual/core/ssl/README.md
+++ b/manual/core/ssl/README.md
@@ -1,3 +1,22 @@
+
+
## SSL
### Quick overview
@@ -75,11 +94,13 @@ If you're using a CA, sign the client certificate with it (see the blog post lin
this page). Then the nodes' truststores only need to contain the CA's certificate (which should
already be the case if you've followed the steps for inter-node encryption).
+`DefaultSslEngineFactory` supports client keystore reloading; see property
+`advanced.ssl-engine-factory.keystore-reload-interval`.
### Driver configuration
By default, the driver's SSL support is based on the JDK's built-in implementation: JSSE (Java
-Secure Socket Extension),.
+Secure Socket Extension).
To enable it, you need to define an engine factory in the [configuration](../configuration/).
@@ -107,6 +128,12 @@ datastax-java-driver {
// truststore-password = password123
// keystore-path = /path/to/client.keystore
// keystore-password = password123
+
+ # The duration between attempts to reload the keystore from the contents of the file specified
+ # by `keystore-path`. This is mainly relevant in environments where certificates have short
+ # lifetimes and applications are restarted infrequently, since an expired client certificate
+ # will prevent new connections from being established until the application is restarted.
+ // keystore-reload-interval = 30 minutes
}
}
```
@@ -204,6 +231,6 @@ the box, but with a bit of custom development it is fairly easy to add. See
[dsClientToNode]: https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureSSLClientToNode.html
[pickle]: http://thelastpickle.com/blog/2015/09/30/hardening-cassandra-step-by-step-part-1-server-to-server.html
[JSSE system properties]: http://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#Customization
-[SessionBuilder.withSslEngineFactory]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withSslEngineFactory-com.datastax.oss.driver.api.core.ssl.SslEngineFactory-
-[SessionBuilder.withSslContext]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withSslContext-javax.net.ssl.SSLContext-
-[ProgrammaticSslEngineFactory]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/ssl/ProgrammaticSslEngineFactory.html
+[SessionBuilder.withSslEngineFactory]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withSslEngineFactory-com.datastax.oss.driver.api.core.ssl.SslEngineFactory-
+[SessionBuilder.withSslContext]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withSslContext-javax.net.ssl.SSLContext-
+[ProgrammaticSslEngineFactory]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/ssl/ProgrammaticSslEngineFactory.html
diff --git a/manual/core/statements/README.md b/manual/core/statements/README.md
index 08646b77609..394e81ae00e 100644
--- a/manual/core/statements/README.md
+++ b/manual/core/statements/README.md
@@ -1,3 +1,22 @@
+
+
## Statements
### Quick overview
@@ -59,7 +78,7 @@ the [configuration](../configuration/). Namely, these are: idempotent flag, quer
consistency levels and page size. We recommended the configuration approach whenever possible (you
can create execution profiles to capture common combinations of those options).
-[Statement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Statement.html
-[StatementBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/StatementBuilder.html
-[execute]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Session.html#execute-com.datastax.oss.driver.api.core.cql.Statement-
-[executeAsync]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Session.html#executeAsync-com.datastax.oss.driver.api.core.cql.Statement-
+[Statement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Statement.html
+[StatementBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/StatementBuilder.html
+[execute]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Session.html#execute-com.datastax.oss.driver.api.core.cql.Statement-
+[executeAsync]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Session.html#executeAsync-com.datastax.oss.driver.api.core.cql.Statement-
diff --git a/manual/core/statements/batch/README.md b/manual/core/statements/batch/README.md
index 051a3a35df9..f080fe16ab0 100644
--- a/manual/core/statements/batch/README.md
+++ b/manual/core/statements/batch/README.md
@@ -1,3 +1,22 @@
+
+
## Batch statements
### Quick overview
@@ -61,8 +80,8 @@ In addition, simple statements with named parameters are currently not supported
due to a [protocol limitation][CASSANDRA-10246] that will be fixed in a future version). If you try
to execute such a batch, an `IllegalArgumentException` is thrown.
-[BatchStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BatchStatement.html
-[BatchStatement.newInstance()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BatchStatement.html#newInstance-com.datastax.oss.driver.api.core.cql.BatchType-
-[BatchStatement.builder()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BatchStatement.html#builder-com.datastax.oss.driver.api.core.cql.BatchType-
+[BatchStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BatchStatement.html
+[BatchStatement.newInstance()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BatchStatement.html#newInstance-com.datastax.oss.driver.api.core.cql.BatchType-
+[BatchStatement.builder()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BatchStatement.html#builder-com.datastax.oss.driver.api.core.cql.BatchType-
[batch_dse]: http://docs.datastax.com/en/dse/6.7/cql/cql/cql_using/useBatch.html
[CASSANDRA-10246]: https://issues.apache.org/jira/browse/CASSANDRA-10246
diff --git a/manual/core/statements/per_query_keyspace/README.md b/manual/core/statements/per_query_keyspace/README.md
index 4100e864660..9a7ffa338c9 100644
--- a/manual/core/statements/per_query_keyspace/README.md
+++ b/manual/core/statements/per_query_keyspace/README.md
@@ -1,3 +1,22 @@
+
+
## Per-query keyspace
### Quick overview
@@ -124,6 +143,6 @@ SimpleStatement statement =
At some point in the future, when Cassandra 4 becomes prevalent and using a per-query keyspace is
the norm, we'll probably deprecate `setRoutingKeyspace()`.
-[token-aware routing]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/Request.html#getRoutingKey--
+[token-aware routing]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/Request.html#getRoutingKey--
-[CASSANDRA-10145]: https://issues.apache.org/jira/browse/CASSANDRA-10145
\ No newline at end of file
+[CASSANDRA-10145]: https://issues.apache.org/jira/browse/CASSANDRA-10145
diff --git a/manual/core/statements/prepared/README.md b/manual/core/statements/prepared/README.md
index 29ad525fc42..5a87b238cbc 100644
--- a/manual/core/statements/prepared/README.md
+++ b/manual/core/statements/prepared/README.md
@@ -1,3 +1,22 @@
+
+
## Prepared statements
### Quick overview
@@ -330,10 +349,10 @@ With Cassandra 4 and [native protocol](../../native_protocol/) v5, this issue is
new version with the response; the driver updates its local cache transparently, and the client can
observe the new columns in the result set.
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[Session.prepare]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlSession.html#prepare-com.datastax.oss.driver.api.core.cql.SimpleStatement-
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[Session.prepare]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlSession.html#prepare-com.datastax.oss.driver.api.core.cql.SimpleStatement-
[CASSANDRA-10786]: https://issues.apache.org/jira/browse/CASSANDRA-10786
[CASSANDRA-10813]: https://issues.apache.org/jira/browse/CASSANDRA-10813
[guava eviction]: https://github.com/google/guava/wiki/CachesExplained#reference-based-eviction
-[PreparedStatement.bind]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/PreparedStatement.html#bind-java.lang.Object...-
-[PreparedStatement.boundStatementBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/PreparedStatement.html#boundStatementBuilder-java.lang.Object...-
+[PreparedStatement.bind]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/PreparedStatement.html#bind-java.lang.Object...-
+[PreparedStatement.boundStatementBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/PreparedStatement.html#boundStatementBuilder-java.lang.Object...-
diff --git a/manual/core/statements/simple/README.md b/manual/core/statements/simple/README.md
index d4f62e0a207..13ddbb7a389 100644
--- a/manual/core/statements/simple/README.md
+++ b/manual/core/statements/simple/README.md
@@ -1,3 +1,22 @@
+
+
## Simple statements
### Quick overview
@@ -182,6 +201,6 @@ session.execute(
Or you could also use [prepared statements](../prepared/), which don't have this limitation since
parameter types are known in advance.
-[SimpleStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/SimpleStatement.html
-[SimpleStatement.newInstance()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/SimpleStatement.html#newInstance-java.lang.String-
-[SimpleStatement.builder()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/SimpleStatement.html#builder-java.lang.String-
+[SimpleStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/SimpleStatement.html
+[SimpleStatement.newInstance()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/SimpleStatement.html#newInstance-java.lang.String-
+[SimpleStatement.builder()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/SimpleStatement.html#builder-java.lang.String-
diff --git a/manual/core/temporal_types/README.md b/manual/core/temporal_types/README.md
index 2bb0573ce90..6542d5b8dac 100644
--- a/manual/core/temporal_types/README.md
+++ b/manual/core/temporal_types/README.md
@@ -1,3 +1,22 @@
+
+
## Temporal types
### Quick overview
@@ -146,7 +165,7 @@ System.out.println(dateTime.minus(CqlDuration.from("1h15s15ns")));
// prints "2018-10-03T22:59:44.999999985-07:00[America/Los_Angeles]"
```
-[CqlDuration]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/CqlDuration.html
-[TypeCodecs.ZONED_TIMESTAMP_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#ZONED_TIMESTAMP_SYSTEM
-[TypeCodecs.ZONED_TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#ZONED_TIMESTAMP_UTC
-[TypeCodecs.zonedTimestampAt()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#zonedTimestampAt-java.time.ZoneId-
\ No newline at end of file
+[CqlDuration]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/CqlDuration.html
+[TypeCodecs.ZONED_TIMESTAMP_SYSTEM]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#ZONED_TIMESTAMP_SYSTEM
+[TypeCodecs.ZONED_TIMESTAMP_UTC]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#ZONED_TIMESTAMP_UTC
+[TypeCodecs.zonedTimestampAt()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/TypeCodecs.html#zonedTimestampAt-java.time.ZoneId-
diff --git a/manual/core/throttling/README.md b/manual/core/throttling/README.md
index f1496cbf176..275c0cb5b40 100644
--- a/manual/core/throttling/README.md
+++ b/manual/core/throttling/README.md
@@ -1,3 +1,22 @@
+
+
## Request throttling
### Quick overview
@@ -145,6 +164,6 @@ datastax-java-driver {
If you enable `throttling.delay`, make sure to also check the associated extra options to correctly
size the underlying histograms (`metrics.session.throttling.delay.*`).
-[RequestThrottlingException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/RequestThrottlingException.html
-[AllNodesFailedException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/AllNodesFailedException.html
-[BusyConnectionException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/connection/BusyConnectionException.html
\ No newline at end of file
+[RequestThrottlingException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/RequestThrottlingException.html
+[AllNodesFailedException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/AllNodesFailedException.html
+[BusyConnectionException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/connection/BusyConnectionException.html
diff --git a/manual/core/tracing/README.md b/manual/core/tracing/README.md
index 858b089ffbe..f9beca8e49b 100644
--- a/manual/core/tracing/README.md
+++ b/manual/core/tracing/README.md
@@ -1,3 +1,22 @@
+
+
## Query tracing
### Quick overview
@@ -113,9 +132,9 @@ for (TraceEvent event : trace.getEvents()) {
If you call `getQueryTrace()` for a statement that didn't have tracing enabled, an exception is
thrown.
-[ExecutionInfo]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html
-[QueryTrace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/QueryTrace.html
-[Statement.setTracing()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Statement.html#setTracing-boolean-
-[StatementBuilder.setTracing()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/StatementBuilder.html#setTracing--
-[ExecutionInfo.getTracingId()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getTracingId--
-[ExecutionInfo.getQueryTrace()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getQueryTrace--
+[ExecutionInfo]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html
+[QueryTrace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/QueryTrace.html
+[Statement.setTracing()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Statement.html#setTracing-boolean-
+[StatementBuilder.setTracing()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/StatementBuilder.html#setTracing--
+[ExecutionInfo.getTracingId()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getTracingId--
+[ExecutionInfo.getQueryTrace()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getQueryTrace--
diff --git a/manual/core/tuples/README.md b/manual/core/tuples/README.md
index e5bda3947a6..d0684b77569 100644
--- a/manual/core/tuples/README.md
+++ b/manual/core/tuples/README.md
@@ -1,3 +1,22 @@
+
+
## Tuples
### Quick overview
@@ -139,5 +158,5 @@ BoundStatement bs =
[cql_doc]: https://docs.datastax.com/en/cql/3.3/cql/cql_reference/tupleType.html
-[TupleType]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/TupleType.html
-[TupleValue]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/TupleValue.html
+[TupleType]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/TupleType.html
+[TupleValue]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/TupleValue.html
diff --git a/manual/core/udts/README.md b/manual/core/udts/README.md
index 99c34f234c4..a22057030ae 100644
--- a/manual/core/udts/README.md
+++ b/manual/core/udts/README.md
@@ -1,3 +1,22 @@
+
+
## User-defined types
### Quick overview
@@ -135,5 +154,5 @@ session.execute(bs);
[cql_doc]: https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlRefUDType.html
-[UdtValue]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/UdtValue.html
-[UserDefinedType]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/UserDefinedType.html
\ No newline at end of file
+[UdtValue]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/UdtValue.html
+[UserDefinedType]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/UserDefinedType.html
diff --git a/manual/developer/README.md b/manual/developer/README.md
index 975ab16c176..b6e0bda16ed 100644
--- a/manual/developer/README.md
+++ b/manual/developer/README.md
@@ -1,3 +1,22 @@
+
+
## Developer docs
This section explains how driver internals work. The intended audience is:
@@ -16,4 +35,4 @@ from lowest to highest level:
* [Request execution](request_execution/): higher-level handling of user requests and responses;
* [Administrative tasks](admin/): everything else (cluster state and metadata).
-If you're reading this on GitHub, the `.nav` file in each directory contains a suggested order.
\ No newline at end of file
+If you're reading this on GitHub, the `.nav` file in each directory contains a suggested order.
diff --git a/manual/developer/admin/README.md b/manual/developer/admin/README.md
index def3b6a2927..0ebd9e2d746 100644
--- a/manual/developer/admin/README.md
+++ b/manual/developer/admin/README.md
@@ -1,3 +1,22 @@
+
+
## Administrative tasks
Aside from the main task of [executing user requests](../request_execution), the driver also needs
@@ -320,4 +339,4 @@ It's less likely that this will be overridden directly. But the schema querying
abstracted behind two factories that handle the differences between Cassandra versions:
`SchemaQueriesFactory` and `SchemaParserFactory`. These are pluggable by [extending the
context](../common/context/#overriding-a-context-component) and overriding the corresponding
-`buildXxx` methods.
\ No newline at end of file
+`buildXxx` methods.
diff --git a/manual/developer/common/README.md b/manual/developer/common/README.md
index c227f0826a5..13ad8639e62 100644
--- a/manual/developer/common/README.md
+++ b/manual/developer/common/README.md
@@ -1,3 +1,22 @@
+
+
## Common infrastructure
This covers utilities or concept that are shared throughout the codebase:
diff --git a/manual/developer/common/concurrency/README.md b/manual/developer/common/concurrency/README.md
index 36db9562032..fb493930d6e 100644
--- a/manual/developer/common/concurrency/README.md
+++ b/manual/developer/common/concurrency/README.md
@@ -1,3 +1,22 @@
+
+
## Concurrency
The driver is a highly concurrent environment. We try to use thread confinement to simplify the
@@ -101,8 +120,8 @@ public interface ExecutionInfo {
When a public API method is blocking, this is generally clearly stated in its javadocs.
-[`ExecutionInfo.getQueryTrace()`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getQueryTrace--
-[`SyncCqlSession`]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/SyncCqlSession.html`
+[`ExecutionInfo.getQueryTrace()`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ExecutionInfo.html#getQueryTrace--
+[`SyncCqlSession`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/SyncCqlSession.html`
`BlockingOperation` is a utility to check that those methods aren't called on I/O threads, which
could introduce deadlocks.
diff --git a/manual/developer/common/context/README.md b/manual/developer/common/context/README.md
index 3c6143e970d..e20d5ad0ddb 100644
--- a/manual/developer/common/context/README.md
+++ b/manual/developer/common/context/README.md
@@ -1,3 +1,22 @@
+
+
## Driver context
The context holds the driver's internal components. It is exposed in the public API as
diff --git a/manual/developer/common/event_bus/README.md b/manual/developer/common/event_bus/README.md
index 837f8c69082..74729ac6656 100644
--- a/manual/developer/common/event_bus/README.md
+++ b/manual/developer/common/event_bus/README.md
@@ -1,3 +1,22 @@
+
+
## Event bus
`EventBus` is a bare-bones messaging mechanism, to decouple components from each other, and
diff --git a/manual/developer/native_protocol/README.md b/manual/developer/native_protocol/README.md
index 11c936d272b..b96553fc51b 100644
--- a/manual/developer/native_protocol/README.md
+++ b/manual/developer/native_protocol/README.md
@@ -1,3 +1,22 @@
+
+
## Native protocol layer
The native protocol layer encodes protocol messages into binary, before they are sent over the
@@ -9,10 +28,8 @@ This part of the code lives in its own project:
The protocol specifications are available in
[native-protocol/src/main/resources](https://github.com/datastax/native-protocol/tree/1.x/src/main/resources).
-These files originally come from Cassandra, we copy them over for easy access. Note that, if the
-latest version is a beta (this is the case for v5 at the time of writing -- September 2019), the
-specification might not be up to date. Always compare with the latest revision in
-[cassandra/doc](https://github.com/apache/cassandra/tree/trunk/doc).
+These files originally come from Cassandra, we copy them over for easy access. Authoritative specifications can
+always be found in [cassandra/doc](https://github.com/apache/cassandra/tree/trunk/doc).
For a broad overview of how protocol types are used in the driver, let's step through an example:
diff --git a/manual/developer/netty_pipeline/README.md b/manual/developer/netty_pipeline/README.md
index 58a32a67a59..b596832e202 100644
--- a/manual/developer/netty_pipeline/README.md
+++ b/manual/developer/netty_pipeline/README.md
@@ -1,3 +1,22 @@
+
+
## Netty pipeline
With the [protocol layer](../native_protocol) in place, the next step is to build the logic for a
@@ -158,4 +177,4 @@ boringssl. This requires a bit of custom development against the internal API:
[SslContext]: https://netty.io/4.1/api/io/netty/handler/ssl/SslContext.html
[SslContext.newHandler]: https://netty.io/4.1/api/io/netty/handler/ssl/SslContext.html#newHandler-io.netty.buffer.ByteBufAllocator-
-[SslContextBuilder.forClient]: https://netty.io/4.1/api/io/netty/handler/ssl/SslContextBuilder.html#forClient--
\ No newline at end of file
+[SslContextBuilder.forClient]: https://netty.io/4.1/api/io/netty/handler/ssl/SslContextBuilder.html#forClient--
diff --git a/manual/developer/request_execution/README.md b/manual/developer/request_execution/README.md
index c6ec04e3b1a..38a0a55fbd7 100644
--- a/manual/developer/request_execution/README.md
+++ b/manual/developer/request_execution/README.md
@@ -1,3 +1,22 @@
+
+
## Request execution
The [Netty pipeline](../netty_pipeline/) gives us the ability to send low-level protocol messages on
diff --git a/manual/mapper/README.md b/manual/mapper/README.md
index 8e745bf44f9..27005b671ad 100644
--- a/manual/mapper/README.md
+++ b/manual/mapper/README.md
@@ -1,10 +1,29 @@
+
+
## Mapper
The mapper generates the boilerplate to execute queries and convert the results into
application-level objects.
-It is published as two artifacts: `com.datastax.oss:java-driver-mapper-processor` and
-`com.datastax.oss:java-driver-mapper-runtime`. See [Integration](config/) for detailed instructions
+It is published as two artifacts: `org.apache.cassandra:java-driver-mapper-processor` and
+`org.apache.cassandra:java-driver-mapper-runtime`. See [Integration](config/) for detailed instructions
for different build tools.
### Quick start
diff --git a/manual/mapper/config/README.md b/manual/mapper/config/README.md
index 5a6df9d2ba7..1e4f9981306 100644
--- a/manual/mapper/config/README.md
+++ b/manual/mapper/config/README.md
@@ -1,3 +1,22 @@
+
+
## Integration
### Builds tools
@@ -21,7 +40,7 @@ configuration (make sure you use version 3.5 or higher):
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-runtime
${java-driver.version}
@@ -37,7 +56,7 @@ configuration (make sure you use version 3.5 or higher):
1.8
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-processor
${java-driver.version}
@@ -61,13 +80,13 @@ as a regular dependency in the "provided" scope:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-processor
${java-driver.version}
provided
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-runtime
${java-driver.version}
diff --git a/manual/mapper/config/kotlin/README.md b/manual/mapper/config/kotlin/README.md
index 50809f8a7f2..a78bf04fb79 100644
--- a/manual/mapper/config/kotlin/README.md
+++ b/manual/mapper/config/kotlin/README.md
@@ -1,3 +1,22 @@
+
+
## Kotlin
[Kotlin](https://kotlinlang.org/) is an alternative language for the JVM. Its compact syntax and
@@ -79,7 +98,7 @@ before compilation:
- com.datastax.oss
+ org.apache.cassandra
java-driver-mapper-processor
${java-driver.version}
@@ -106,4 +125,4 @@ before compilation:
[build.gradle]: https://github.com/DataStax-Examples/object-mapper-jvm/blob/master/kotlin/build.gradle
[UserDao.kt]: https://github.com/DataStax-Examples/object-mapper-jvm/blob/master/kotlin/src/main/kotlin/com/datastax/examples/mapper/killrvideo/user/UserDao.kt
-[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
+[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
diff --git a/manual/mapper/config/lombok/README.md b/manual/mapper/config/lombok/README.md
index e2a4f0263c8..b87f8f79ea4 100644
--- a/manual/mapper/config/lombok/README.md
+++ b/manual/mapper/config/lombok/README.md
@@ -1,3 +1,22 @@
+
+
## Lombok
[Lombok](https://projectlombok.org/) is a popular library that automates repetitive code, such as
diff --git a/manual/mapper/config/record/README.md b/manual/mapper/config/record/README.md
index 8d6f9621b47..95530d52742 100644
--- a/manual/mapper/config/record/README.md
+++ b/manual/mapper/config/record/README.md
@@ -1,3 +1,22 @@
+
+
## Java 14 Records
Java 14 introduced [Record] as a lightweight, immutable alternative to POJOs. You can map annotated
@@ -27,7 +46,7 @@ You need to build with Java 14, and pass the `--enable-preview` flag to both the
runtime JVM. See [pom.xml] in the example.
-[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
+[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
[DataStax-Examples/object-mapper-jvm/record]: https://github.com/DataStax-Examples/object-mapper-jvm/tree/master/record
[pom.xml]: https://github.com/DataStax-Examples/object-mapper-jvm/blob/master/record/pom.xml
diff --git a/manual/mapper/config/scala/README.md b/manual/mapper/config/scala/README.md
index e0d1970c209..2cb75273d0b 100644
--- a/manual/mapper/config/scala/README.md
+++ b/manual/mapper/config/scala/README.md
@@ -1,3 +1,22 @@
+
+
## Scala
[Scala](https://www.scala-lang.org/) is an alternative language for the JVM. It doesn't support
@@ -54,4 +73,4 @@ mapper builder.
[DataStax-Examples/object-mapper-jvm/scala]: https://github.com/DataStax-Examples/object-mapper-jvm/tree/master/scala
[build.sbt]: https://github.com/DataStax-Examples/object-mapper-jvm/blob/master/scala/build.sbt
-[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
+[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
diff --git a/manual/mapper/daos/README.md b/manual/mapper/daos/README.md
index c55a10cc3ba..d12172bf056 100644
--- a/manual/mapper/daos/README.md
+++ b/manual/mapper/daos/README.md
@@ -1,3 +1,22 @@
+
+
## DAOs
### Quick overview
@@ -148,8 +167,8 @@ In this case, any annotations declared in `Dao1` would be chosen over `Dao2`.
To control how the hierarchy is scanned, annotate interfaces with [@HierarchyScanStrategy].
-[@Dao]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Dao.html
-[@DaoFactory]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.html
-[@DefaultNullSavingStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.html
-[@HierarchyScanStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.html
+[@Dao]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Dao.html
+[@DaoFactory]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.html
+[@DefaultNullSavingStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.html
+[@HierarchyScanStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.html
[Entity Inheritance]: ../entities/#inheritance
diff --git a/manual/mapper/daos/custom_types/README.md b/manual/mapper/daos/custom_types/README.md
index ed5fd69a535..19f689655a7 100644
--- a/manual/mapper/daos/custom_types/README.md
+++ b/manual/mapper/daos/custom_types/README.md
@@ -1,3 +1,22 @@
+
+
## Custom result types
The mapper supports a pre-defined set of built-in types for DAO method results. For example, a
@@ -236,8 +255,8 @@ flag:
With this configuration, if a DAO method declares a non built-in return type, it will be surfaced as
a compiler error.
-[EntityHelper]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/entity/EntityHelper.html
-[GenericType]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
-[MapperContext]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/MapperContext.html
-[MapperResultProducer]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/result/MapperResultProducer.html
-[MapperResultProducerService]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/result/MapperResultProducerService.html
+[EntityHelper]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/entity/EntityHelper.html
+[GenericType]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/reflect/GenericType.html
+[MapperContext]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/MapperContext.html
+[MapperResultProducer]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/result/MapperResultProducer.html
+[MapperResultProducerService]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/result/MapperResultProducerService.html
diff --git a/manual/mapper/daos/delete/README.md b/manual/mapper/daos/delete/README.md
index 6d4ad9854cc..e67ecdc8a6e 100644
--- a/manual/mapper/daos/delete/README.md
+++ b/manual/mapper/daos/delete/README.md
@@ -1,3 +1,22 @@
+
+
## Delete methods
Annotate a DAO method with [@Delete] to generate a query that deletes an [Entity](../../entities):
@@ -151,16 +170,16 @@ If a table was specified when creating the DAO, then the generated query targets
Otherwise, it uses the default table name for the entity (which is determined by the name of the
entity class and the [naming strategy](../../entities/#naming-strategy)).
-[default keyspace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
-[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
-[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
-[@Delete]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Delete.html
-[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[ResultSet#wasApplied()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html#wasApplied--
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
+[default keyspace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
+[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
+[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
+[@Delete]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Delete.html
+[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[ResultSet#wasApplied()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html#wasApplied--
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
-[CompletableFuture]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
\ No newline at end of file
+[CompletableFuture]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
diff --git a/manual/mapper/daos/getentity/README.md b/manual/mapper/daos/getentity/README.md
index 6c37bb1169b..de9a530b558 100644
--- a/manual/mapper/daos/getentity/README.md
+++ b/manual/mapper/daos/getentity/README.md
@@ -1,3 +1,22 @@
+
+
## GetEntity methods
Annotate a DAO method with [@GetEntity] to convert a core driver data structure into one or more
@@ -89,7 +108,7 @@ The method can return:
* a single entity instance. If the argument is a result set type, the generated code will extract
the first row and convert it, or return `null` if the result set is empty.
- ````java
+ ```java
@GetEntity
Product asProduct(Row row);
@@ -130,15 +149,15 @@ If the return type doesn't match the parameter type (for example [PagingIterable
[AsyncResultSet]), the mapper processor will issue a compile-time error.
-[@GetEntity]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/GetEntity.html
-[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
-[GettableByName]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/GettableByName.html
-[MappedAsyncPagingIterable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/MappedAsyncPagingIterable.html
-[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/PagingIterable.html
-[PagingIterable.spliterator]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/PagingIterable.html#spliterator--
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[Row]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Row.html
-[UdtValue]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/UdtValue.html
+[@GetEntity]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/GetEntity.html
+[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
+[GettableByName]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/GettableByName.html
+[MappedAsyncPagingIterable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/MappedAsyncPagingIterable.html
+[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/PagingIterable.html
+[PagingIterable.spliterator]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/PagingIterable.html#spliterator--
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[Row]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Row.html
+[UdtValue]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/UdtValue.html
[Stream]: https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html
diff --git a/manual/mapper/daos/increment/README.md b/manual/mapper/daos/increment/README.md
index 1c2c1f24d3c..44b017be2e1 100644
--- a/manual/mapper/daos/increment/README.md
+++ b/manual/mapper/daos/increment/README.md
@@ -1,3 +1,22 @@
+
+
## Increment methods
Annotate a DAO method with [@Increment] to generate a query that updates a counter table that is
@@ -75,12 +94,12 @@ If a table was specified when creating the DAO, then the generated query targets
Otherwise, it uses the default table name for the entity (which is determined by the name of the
entity class and the naming convention).
-[@Increment]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Increment.html
-[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
-[default keyspace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
-[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
-[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
-[@CqlName]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/CqlName.html
+[@Increment]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Increment.html
+[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
+[default keyspace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
+[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
+[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
+[@CqlName]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/CqlName.html
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
[CompletableFuture]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
diff --git a/manual/mapper/daos/insert/README.md b/manual/mapper/daos/insert/README.md
index 2d4a08fb694..b90ffa33a32 100644
--- a/manual/mapper/daos/insert/README.md
+++ b/manual/mapper/daos/insert/README.md
@@ -1,3 +1,22 @@
+
+
## Insert methods
Annotate a DAO method with [@Insert] to generate a query that inserts an [Entity](../../entities):
@@ -108,13 +127,13 @@ If a table was specified when creating the DAO, then the generated query targets
Otherwise, it uses the default table name for the entity (which is determined by the name of the
entity class and the [naming strategy](../../entities/#naming-strategy)).
-[default keyspace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
-[@Insert]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Insert.html
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[ResultSet#wasApplied()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html#wasApplied--
-[ResultSet#getExecutionInfo()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html#getExecutionInfo--
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
+[default keyspace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
+[@Insert]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Insert.html
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[ResultSet#wasApplied()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html#wasApplied--
+[ResultSet#getExecutionInfo()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html#getExecutionInfo--
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
[CompletableFuture]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
diff --git a/manual/mapper/daos/null_saving/README.md b/manual/mapper/daos/null_saving/README.md
index aca631062db..eed98934356 100644
--- a/manual/mapper/daos/null_saving/README.md
+++ b/manual/mapper/daos/null_saving/README.md
@@ -1,3 +1,22 @@
+
+
## Null saving strategy
The null saving strategy controls how null entity properties are handled when writing to the
@@ -93,10 +112,10 @@ public interface UserDao extends InventoryDao {
}
```
-[@DefaultNullSavingStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.html
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[MapperException]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/MapperException.html
-[DO_NOT_SET]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.html#DO_NOT_SET
-[SET_TO_NULL]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.html#SET_TO_NULL
+[@DefaultNullSavingStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.html
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[MapperException]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/MapperException.html
+[DO_NOT_SET]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.html#DO_NOT_SET
+[SET_TO_NULL]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.html#SET_TO_NULL
[CASSANDRA-7304]: https://issues.apache.org/jira/browse/CASSANDRA-7304
diff --git a/manual/mapper/daos/query/README.md b/manual/mapper/daos/query/README.md
index d45063eb74c..a11753da880 100644
--- a/manual/mapper/daos/query/README.md
+++ b/manual/mapper/daos/query/README.md
@@ -1,3 +1,22 @@
+
+
## Query methods
Annotate a DAO method with [@Query] to provide your own query string:
@@ -113,18 +132,18 @@ Then:
query succeeds or not depends on whether the session that the mapper was built with has a [default
keyspace].
-[default keyspace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
-[@Query]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Query.html
-[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[ResultSet#wasApplied()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html#wasApplied--
-[MappedAsyncPagingIterable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/MappedAsyncPagingIterable.html
-[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/PagingIterable.html
-[PagingIterable.spliterator]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/PagingIterable.html#spliterator--
-[Row]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/Row.html
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
-[MappedReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.html
+[default keyspace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
+[@Query]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Query.html
+[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[ResultSet#wasApplied()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html#wasApplied--
+[MappedAsyncPagingIterable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/MappedAsyncPagingIterable.html
+[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/PagingIterable.html
+[PagingIterable.spliterator]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/PagingIterable.html#spliterator--
+[Row]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/Row.html
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
+[MappedReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.html
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
[CompletableFuture]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
diff --git a/manual/mapper/daos/queryprovider/README.md b/manual/mapper/daos/queryprovider/README.md
index e4958928c59..593a3a6b1a4 100644
--- a/manual/mapper/daos/queryprovider/README.md
+++ b/manual/mapper/daos/queryprovider/README.md
@@ -1,3 +1,22 @@
+
+
## Query provider methods
Annotate a DAO method with [@QueryProvider] to delegate the execution of the query to one of your
@@ -137,11 +156,11 @@ Here is the full implementation:
the desired [PagingIterable][PagingIterable].
-[@QueryProvider]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html
-[providerClass]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html#providerClass--
-[entityHelpers]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html#entityHelpers--
-[providerMethod]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html#providerMethod--
-[MapperContext]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/MapperContext.html
-[EntityHelper]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/EntityHelper.html
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/PagingIterable.html
+[@QueryProvider]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html
+[providerClass]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html#providerClass--
+[entityHelpers]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html#entityHelpers--
+[providerMethod]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.html#providerMethod--
+[MapperContext]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/MapperContext.html
+[EntityHelper]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/EntityHelper.html
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/PagingIterable.html
diff --git a/manual/mapper/daos/select/README.md b/manual/mapper/daos/select/README.md
index 857e176552d..fb6c4ca2077 100644
--- a/manual/mapper/daos/select/README.md
+++ b/manual/mapper/daos/select/README.md
@@ -1,3 +1,22 @@
+
+
## Select methods
Annotate a DAO method with [@Select] to generate a query that selects one or more rows, and maps
@@ -160,20 +179,20 @@ If a table was specified when creating the DAO, then the generated query targets
Otherwise, it uses the default table name for the entity (which is determined by the name of the
entity class and the [naming strategy](../../entities/#naming-strategy)).
-[default keyspace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
-[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
-[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
-[@Select]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html
-[allowFiltering()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html#allowFiltering--
-[customWhereClause()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html#customWhereClause--
-[groupBy()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html#groupBy--
-[limit()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html#limit--
-[orderBy()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html#orderBy--
-[perPartitionLimit()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html#perPartitionLimit--
-[MappedAsyncPagingIterable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/MappedAsyncPagingIterable.html
-[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/PagingIterable.html
-[PagingIterable.spliterator]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/PagingIterable.html#spliterator--
-[MappedReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.html
+[default keyspace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
+[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
+[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
+[@Select]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html
+[allowFiltering()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html#allowFiltering--
+[customWhereClause()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html#customWhereClause--
+[groupBy()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html#groupBy--
+[limit()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html#limit--
+[orderBy()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html#orderBy--
+[perPartitionLimit()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html#perPartitionLimit--
+[MappedAsyncPagingIterable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/MappedAsyncPagingIterable.html
+[PagingIterable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/PagingIterable.html
+[PagingIterable.spliterator]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/PagingIterable.html#spliterator--
+[MappedReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.html
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
[CompletableFuture]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
diff --git a/manual/mapper/daos/setentity/README.md b/manual/mapper/daos/setentity/README.md
index de6701ada50..eeb7957f62e 100644
--- a/manual/mapper/daos/setentity/README.md
+++ b/manual/mapper/daos/setentity/README.md
@@ -1,3 +1,22 @@
+
+
## SetEntity methods
Annotate a DAO method with [@SetEntity] to fill a core driver data structure from an
@@ -112,8 +131,8 @@ BoundStatement bind(Product product, BoundStatement statement);
If you use a void method with [BoundStatement], the mapper processor will issue a compile-time
warning.
-[@SetEntity]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/SetEntity.html
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[BoundStatementBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatementBuilder.html
-[SettableByName]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/SettableByName.html
-[UdtValue]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/data/UdtValue.html
+[@SetEntity]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/SetEntity.html
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[BoundStatementBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatementBuilder.html
+[SettableByName]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/SettableByName.html
+[UdtValue]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/data/UdtValue.html
diff --git a/manual/mapper/daos/statement_attributes/README.md b/manual/mapper/daos/statement_attributes/README.md
index 141b619dd7f..f772df36775 100644
--- a/manual/mapper/daos/statement_attributes/README.md
+++ b/manual/mapper/daos/statement_attributes/README.md
@@ -1,3 +1,22 @@
+
+
## Statement attributes
The [@Delete](../delete/), [@Insert](../insert/), [@Query](../query/), [@Select](../select/) and
@@ -60,4 +79,4 @@ Product product =
dao.findById(1, builder -> builder.setConsistencyLevel(DefaultConsistencyLevel.QUORUM));
```
-[@StatementAttributes]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/StatementAttributes.html
\ No newline at end of file
+[@StatementAttributes]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/StatementAttributes.html
diff --git a/manual/mapper/daos/update/README.md b/manual/mapper/daos/update/README.md
index 610bc9fb4d7..87e9286c800 100644
--- a/manual/mapper/daos/update/README.md
+++ b/manual/mapper/daos/update/README.md
@@ -1,3 +1,22 @@
+
+
## Update methods
Annotate a DAO method with [@Update] to generate a query that updates one or more
@@ -143,13 +162,13 @@ If a table was specified when creating the DAO, then the generated query targets
Otherwise, it uses the default table name for the entity (which is determined by the name of the
entity class and the naming convention).
-[default keyspace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
-[@Update]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Update.html
+[default keyspace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withKeyspace-com.datastax.oss.driver.api.core.CqlIdentifier-
+[@Update]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Update.html
-[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
+[AsyncResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/AsyncResultSet.html
[Boolean]: https://docs.oracle.com/javase/8/docs/api/index.html?java/lang/Boolean.html
[CompletionStage]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletionStage.html
[CompletableFuture]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
-[ResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/ResultSet.html
-[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/cql/BoundStatement.html
-[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
+[ResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/ResultSet.html
+[BoundStatement]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/cql/BoundStatement.html
+[ReactiveResultSet]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/core/cql/reactive/ReactiveResultSet.html
diff --git a/manual/mapper/entities/README.md b/manual/mapper/entities/README.md
index 72edc82ea66..978c781245f 100644
--- a/manual/mapper/entities/README.md
+++ b/manual/mapper/entities/README.md
@@ -1,3 +1,22 @@
+
+
## Entities
### Quick overview
@@ -555,22 +574,22 @@ the same level.
To control how the class hierarchy is scanned, annotate classes with [@HierarchyScanStrategy].
-[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
-[@CqlName]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/CqlName.html
-[@Dao]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Dao.html
-[@Entity]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Entity.html
-[NameConverter]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/entity/naming/NameConverter.html
-[NamingConvention]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/entity/naming/NamingConvention.html
-[@NamingStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/NamingStrategy.html
-[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
-[@Computed]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Computed.html
-[@Select]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Select.html
-[@Insert]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Insert.html
-[@Update]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Update.html
-[@GetEntity]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/GetEntity.html
-[@Query]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Query.html
+[@ClusteringColumn]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.html
+[@CqlName]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/CqlName.html
+[@Dao]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Dao.html
+[@Entity]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Entity.html
+[NameConverter]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/entity/naming/NameConverter.html
+[NamingConvention]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/entity/naming/NamingConvention.html
+[@NamingStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/NamingStrategy.html
+[@PartitionKey]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.html
+[@Computed]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Computed.html
+[@Select]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Select.html
+[@Insert]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Insert.html
+[@Update]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Update.html
+[@GetEntity]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/GetEntity.html
+[@Query]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Query.html
[aliases]: http://cassandra.apache.org/doc/latest/cql/dml.html?#aliases
-[@Transient]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Transient.html
-[@TransientProperties]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/TransientProperties.html
-[@HierarchyScanStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.html
-[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
+[@Transient]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Transient.html
+[@TransientProperties]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/TransientProperties.html
+[@HierarchyScanStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.html
+[@PropertyStrategy]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.html
diff --git a/manual/mapper/mapper/README.md b/manual/mapper/mapper/README.md
index 0a81816f9a3..752424c9a3b 100644
--- a/manual/mapper/mapper/README.md
+++ b/manual/mapper/mapper/README.md
@@ -1,3 +1,22 @@
+
+
## Mapper interface
### Quick overview
@@ -39,7 +58,7 @@ public interface InventoryMapper {
```
The builder allows you to create a mapper instance, by wrapping a core `CqlSession` (if you need
-more details on how to create a session, refer to the [core driver documentation](../core/)).
+more details on how to create a session, refer to the [core driver documentation](../../core/)).
```java
CqlSession session = CqlSession.builder().build();
@@ -230,8 +249,8 @@ InventoryMapper inventoryMapper = new InventoryMapperBuilder(session)
You can also permanently disable validation of an individual entity by annotating it with
`@SchemaHint(targetElement = NONE)`.
-[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlIdentifier.html
-[@DaoFactory]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.html
-[@DaoKeyspace]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/DaoKeyspace.html
-[@DaoTable]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/DaoTable.html
-[@Mapper]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/mapper/annotations/Mapper.html
+[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlIdentifier.html
+[@DaoFactory]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.html
+[@DaoKeyspace]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/DaoKeyspace.html
+[@DaoTable]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/DaoTable.html
+[@Mapper]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/mapper/annotations/Mapper.html
diff --git a/manual/osgi/README.md b/manual/osgi/README.md
index 966d89c12a6..92cd4625b68 100644
--- a/manual/osgi/README.md
+++ b/manual/osgi/README.md
@@ -1,3 +1,22 @@
+
+
# OSGi
The driver is available as an [OSGi] bundle. More specifically, the following maven artifacts are
@@ -138,7 +157,7 @@ starting the driver:
[driver configuration]: ../core/configuration
[OSGi]:https://www.osgi.org
[JNR]: https://github.com/jnr/jnr-posix
-[withClassLoader()]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withClassLoader-java.lang.ClassLoader-
+[withClassLoader()]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withClassLoader-java.lang.ClassLoader-
[JAVA-1127]:https://datastax-oss.atlassian.net/browse/JAVA-1127
-[DriverConfigLoader.fromDefaults(ClassLoader)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromDefaults-java.lang.ClassLoader-
-[DriverConfigLoader.programmaticBuilder(ClassLoader)]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#programmaticBuilder-java.lang.ClassLoader-
+[DriverConfigLoader.fromDefaults(ClassLoader)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#fromDefaults-java.lang.ClassLoader-
+[DriverConfigLoader.programmaticBuilder(ClassLoader)]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/config/DriverConfigLoader.html#programmaticBuilder-java.lang.ClassLoader-
diff --git a/manual/query_builder/README.md b/manual/query_builder/README.md
index 4677fb84145..d1932b329e7 100644
--- a/manual/query_builder/README.md
+++ b/manual/query_builder/README.md
@@ -1,3 +1,22 @@
+
+
## Query builder
The query builder is a utility to **generate CQL queries programmatically**. For example, it could
@@ -12,7 +31,7 @@ To use it in your application, add the following dependency:
```xml
- com.datastax.oss
+ org.apache.cassandra
java-driver-query-builder
${driver.version}
@@ -212,8 +231,8 @@ For a complete tour of the API, browse the child pages in this manual:
* [Terms](term/)
* [Idempotence](idempotence/)
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
-[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/CqlIdentifier.html
-[DseQueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/querybuilder/DseQueryBuilder.html
-[DseSchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/dse/driver/api/querybuilder/DseSchemaBuilder.html
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[CqlIdentifier]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/CqlIdentifier.html
+[DseQueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/querybuilder/DseQueryBuilder.html
+[DseSchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/dse/driver/api/querybuilder/DseSchemaBuilder.html
diff --git a/manual/query_builder/condition/README.md b/manual/query_builder/condition/README.md
index 01897774c85..1a6a37eb2ef 100644
--- a/manual/query_builder/condition/README.md
+++ b/manual/query_builder/condition/README.md
@@ -1,3 +1,22 @@
+
+
## Conditions
A condition is a clause that appears after the IF keyword in a conditional [UPDATE](../update/) or
@@ -132,4 +151,4 @@ It is mutually exclusive with column conditions: if you previously specified col
the statement, they will be ignored; conversely, adding a column condition cancels a previous IF
EXISTS clause.
-[Condition]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/condition/Condition.html
+[Condition]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/condition/Condition.html
diff --git a/manual/query_builder/delete/README.md b/manual/query_builder/delete/README.md
index 2aff86a6825..8e97920ae9f 100644
--- a/manual/query_builder/delete/README.md
+++ b/manual/query_builder/delete/README.md
@@ -1,3 +1,22 @@
+
+
## DELETE
To start a DELETE query, use one of the `deleteFrom` methods in [QueryBuilder]. There are several
@@ -141,5 +160,5 @@ deleteFrom("user")
Conditions are a common feature used by UPDATE and DELETE, so they have a
[dedicated page](../condition) in this manual.
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
-[Selector]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/select/Selector.html
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
+[Selector]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/select/Selector.html
diff --git a/manual/query_builder/idempotence/README.md b/manual/query_builder/idempotence/README.md
index 9fd6d39114d..2f97151d277 100644
--- a/manual/query_builder/idempotence/README.md
+++ b/manual/query_builder/idempotence/README.md
@@ -1,3 +1,22 @@
+
+
## Idempotence in the query builder
When you generate a statement (or a statement builder) from the query builder, it automatically
@@ -225,4 +244,4 @@ sequential history that is correct. From our clients' point of view, there were
But overall the column changed from 1 to 2. There is no ordering of the two operations that can
explain that change. We broke linearizability by doing a transparent retry at step 6.
-[linearizability]: https://en.wikipedia.org/wiki/Linearizability#Definition_of_linearizability
\ No newline at end of file
+[linearizability]: https://en.wikipedia.org/wiki/Linearizability#Definition_of_linearizability
diff --git a/manual/query_builder/insert/README.md b/manual/query_builder/insert/README.md
index 269afba7437..6bac896d9b8 100644
--- a/manual/query_builder/insert/README.md
+++ b/manual/query_builder/insert/README.md
@@ -1,3 +1,22 @@
+
+
## INSERT
To start an INSERT query, use one of the `insertInto` methods in [QueryBuilder]. There are
@@ -114,4 +133,4 @@ is executed. This is distinctly different than setting the value to null. Passin
this method will only remove the USING TTL clause from the query, which will not alter the TTL (if
one is set) in Cassandra.
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
\ No newline at end of file
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
diff --git a/manual/query_builder/relation/README.md b/manual/query_builder/relation/README.md
index c4d4990affa..eb1c728888e 100644
--- a/manual/query_builder/relation/README.md
+++ b/manual/query_builder/relation/README.md
@@ -1,3 +1,22 @@
+
+
## Relations
A relation is a clause that appears after the WHERE keyword, and restricts the rows that the
@@ -201,5 +220,5 @@ This should be used with caution, as it's possible to generate invalid CQL that
execution time; on the other hand, it can be used as a workaround to handle new CQL features that
are not yet covered by the query builder.
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
-[Relation]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/relation/Relation.html
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
+[Relation]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/relation/Relation.html
diff --git a/manual/query_builder/schema/README.md b/manual/query_builder/schema/README.md
index de6d4bacd6c..0472c8e8c6f 100644
--- a/manual/query_builder/schema/README.md
+++ b/manual/query_builder/schema/README.md
@@ -1,3 +1,22 @@
+
+
# Schema builder
The schema builder is an additional API provided by [java-driver-query-builder](../) that enables
@@ -44,4 +63,4 @@ element type:
* [function](function/)
* [aggregate](aggregate/)
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
diff --git a/manual/query_builder/schema/aggregate/README.md b/manual/query_builder/schema/aggregate/README.md
index fbdf36147e3..a54f8703d69 100644
--- a/manual/query_builder/schema/aggregate/README.md
+++ b/manual/query_builder/schema/aggregate/README.md
@@ -1,3 +1,22 @@
+
+
## Aggregate
Aggregates enable users to apply User-defined functions (UDF) to rows in a data set and combine
@@ -76,4 +95,4 @@ dropAggregate("average").ifExists();
// DROP AGGREGATE IF EXISTS average
```
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
diff --git a/manual/query_builder/schema/function/README.md b/manual/query_builder/schema/function/README.md
index c77f6431b73..001327626b1 100644
--- a/manual/query_builder/schema/function/README.md
+++ b/manual/query_builder/schema/function/README.md
@@ -1,3 +1,22 @@
+
+
## Function
User-defined functions (UDF) enable users to create user code written in JSR-232 compliant scripting
@@ -92,4 +111,4 @@ dropFunction("log").ifExists();
// DROP FUNCTION IF EXISTS log
```
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
diff --git a/manual/query_builder/schema/index/README.md b/manual/query_builder/schema/index/README.md
index 9c590c1e79e..c0c9448dfab 100644
--- a/manual/query_builder/schema/index/README.md
+++ b/manual/query_builder/schema/index/README.md
@@ -1,3 +1,22 @@
+
+
# Index
An index provides a means of expanding the query capabilities of a table. [SchemaBuilder] offers
@@ -99,4 +118,4 @@ dropIndex("my_idx").ifExists();
// DROP INDEX IF EXISTS my_idx
```
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
diff --git a/manual/query_builder/schema/keyspace/README.md b/manual/query_builder/schema/keyspace/README.md
index a07af3479f4..572e8af1658 100644
--- a/manual/query_builder/schema/keyspace/README.md
+++ b/manual/query_builder/schema/keyspace/README.md
@@ -1,3 +1,22 @@
+
+
## Keyspace
A keyspace is a top-level namespace that defines a name, replication strategy and configurable
@@ -83,6 +102,6 @@ dropKeyspace("cycling").ifExists();
// DROP KEYSPACE IF EXISTS cycling
```
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
diff --git a/manual/query_builder/schema/materialized_view/README.md b/manual/query_builder/schema/materialized_view/README.md
index 55c9cc41c07..c4f495f95aa 100644
--- a/manual/query_builder/schema/materialized_view/README.md
+++ b/manual/query_builder/schema/materialized_view/README.md
@@ -1,3 +1,22 @@
+
+
## Materialized View
Materialized Views are an experimental feature introduced in Apache Cassandra 3.0 that provide a
@@ -85,5 +104,5 @@ dropTable("cyclist_by_age").ifExists();
// DROP MATERIALIZED VIEW IF EXISTS cyclist_by_age
```
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
-[RelationStructure]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/schema/RelationStructure.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[RelationStructure]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/schema/RelationStructure.html
diff --git a/manual/query_builder/schema/table/README.md b/manual/query_builder/schema/table/README.md
index a3000ee70db..090f8a1f67b 100644
--- a/manual/query_builder/schema/table/README.md
+++ b/manual/query_builder/schema/table/README.md
@@ -1,3 +1,22 @@
+
+
## Table
Data in Apache Cassandra is stored in tables. [SchemaBuilder] offers API methods for creating,
@@ -107,6 +126,6 @@ dropTable("cyclist_name").ifExists();
// DROP TABLE IF EXISTS cyclist_name
```
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
-[CreateTableWithOptions]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/schema/CreateTableWithOptions.html
-[AlterTableWithOptions]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/schema/AlterTableWithOptions.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[CreateTableWithOptions]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/schema/CreateTableWithOptions.html
+[AlterTableWithOptions]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/schema/AlterTableWithOptions.html
diff --git a/manual/query_builder/schema/type/README.md b/manual/query_builder/schema/type/README.md
index c5302843f7d..c289ad776a8 100644
--- a/manual/query_builder/schema/type/README.md
+++ b/manual/query_builder/schema/type/README.md
@@ -1,3 +1,22 @@
+
+
## Type
User-defined types are special types that can associate multiple named fields to a single column.
@@ -88,4 +107,4 @@ dropTable("address").ifExists();
// DROP TYPE IF EXISTS address
```
-[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
+[SchemaBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/SchemaBuilder.html
diff --git a/manual/query_builder/select/README.md b/manual/query_builder/select/README.md
index 42fd0410bcd..0425423a402 100644
--- a/manual/query_builder/select/README.md
+++ b/manual/query_builder/select/README.md
@@ -1,3 +1,22 @@
+
+
## SELECT
Start your SELECT with the `selectFrom` method in [QueryBuilder]. There are several variants
@@ -368,6 +387,29 @@ selectFrom("sensor_data")
// SELECT reading FROM sensor_data WHERE id=? ORDER BY date DESC
```
+Vector Search:
+
+```java
+
+import com.datastax.oss.driver.api.core.data.CqlVector;
+
+selectFrom("foo")
+ .all()
+ .where(Relation.column("k").isEqualTo(literal(1)))
+ .orderByAnnOf("c1", CqlVector.newInstance(0.1, 0.2, 0.3));
+// SELECT * FROM foo WHERE k=1 ORDER BY c1 ANN OF [0.1, 0.2, 0.3]
+
+selectFrom("cycling", "comments_vs")
+ .column("comment")
+ .function(
+ "similarity_cosine",
+ Selector.column("comment_vector"),
+ literal(CqlVector.newInstance(0.2, 0.15, 0.3, 0.2, 0.05)))
+ .orderByAnnOf("comment_vector", CqlVector.newInstance(0.1, 0.15, 0.3, 0.12, 0.05))
+ .limit(1);
+// SELECT comment,similarity_cosine(comment_vector,[0.2, 0.15, 0.3, 0.2, 0.05]) FROM cycling.comments_vs ORDER BY comment_vector ANN OF [0.1, 0.15, 0.3, 0.12, 0.05] LIMIT 1
+```
+
Limits:
```java
@@ -391,5 +433,5 @@ selectFrom("user").all().allowFiltering();
// SELECT * FROM user ALLOW FILTERING
```
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
-[Selector]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/select/Selector.html
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
+[Selector]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/select/Selector.html
diff --git a/manual/query_builder/term/README.md b/manual/query_builder/term/README.md
index 7fb94e0f31f..460ed8dcb10 100644
--- a/manual/query_builder/term/README.md
+++ b/manual/query_builder/term/README.md
@@ -1,3 +1,22 @@
+
+
## Terms
A term is an expression that does not involve the value of a column. It is used:
@@ -105,5 +124,5 @@ This should be used with caution, as it's possible to generate invalid CQL that
execution time; on the other hand, it can be used as a workaround to handle new CQL features that
are not yet covered by the query builder.
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
-[CodecRegistry]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html
\ No newline at end of file
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
+[CodecRegistry]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/type/codec/registry/CodecRegistry.html
diff --git a/manual/query_builder/truncate/README.md b/manual/query_builder/truncate/README.md
index d877433dd2e..c8cd6945123 100644
--- a/manual/query_builder/truncate/README.md
+++ b/manual/query_builder/truncate/README.md
@@ -1,3 +1,22 @@
+
+
## TRUNCATE
To create a TRUNCATE query, use one of the `truncate` methods in [QueryBuilder]. There are several
@@ -17,4 +36,4 @@ Truncate truncate2 = truncate(CqlIdentifier.fromCql("mytable"));
Note that, at this stage, the query is ready to build. After creating a TRUNCATE query it does not
take any values.
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
diff --git a/manual/query_builder/update/README.md b/manual/query_builder/update/README.md
index 1161d093bc4..15502f52bb7 100644
--- a/manual/query_builder/update/README.md
+++ b/manual/query_builder/update/README.md
@@ -1,3 +1,22 @@
+
+
## UPDATE
To start an UPDATE query, use one of the `update` methods in [QueryBuilder]. There are several
@@ -251,5 +270,5 @@ update("foo")
Conditions are a common feature used by UPDATE and DELETE, so they have a
[dedicated page](../condition) in this manual.
-[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
-[Assignment]: https://docs.datastax.com/en/drivers/java/4.14/com/datastax/oss/driver/api/querybuilder/update/Assignment.html
+[QueryBuilder]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/QueryBuilder.html
+[Assignment]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/querybuilder/update/Assignment.html
diff --git a/mapper-processor/CONTRIBUTING.md b/mapper-processor/CONTRIBUTING.md
index 11659a9f936..c6d324106c4 100644
--- a/mapper-processor/CONTRIBUTING.md
+++ b/mapper-processor/CONTRIBUTING.md
@@ -1,3 +1,22 @@
+
+
# Mapper contributing guidelines
Everything in the [main contribution guidelines](../CONTRIBUTING.md) also applies to the mapper.
diff --git a/mapper-processor/pom.xml b/mapper-processor/pom.xml
index 81c1a78c95a..04d8c98c4f0 100644
--- a/mapper-processor/pom.xml
+++ b/mapper-processor/pom.xml
@@ -1,13 +1,15 @@
diff --git a/mapper-runtime/revapi.json b/mapper-runtime/revapi.json
index 18d26a7f7e9..3dc2ea21671 100644
--- a/mapper-runtime/revapi.json
+++ b/mapper-runtime/revapi.json
@@ -1,5 +1,3 @@
-// Configures Revapi (https://revapi.org/getting-started.html) to check API compatibility between
-// successive driver versions.
{
"revapi": {
"java": {
@@ -11,7 +9,7 @@
"com\\.datastax\\.(oss|dse)\\.driver\\.internal(\\..+)?",
"com\\.datastax\\.oss\\.driver\\.shaded(\\..+)?",
"com\\.datastax\\.oss\\.simulacron(\\..+)?",
- // Don't re-check sibling modules that this module depends on
+ "// Don't re-check sibling modules that this module depends on",
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.core(\\..+)?",
"com\\.datastax\\.(oss|dse)\\.driver\\.api\\.querybuilder(\\..+)?"
]
@@ -22,7 +20,7 @@
{
"regex": true,
"code": "java.annotation.attributeValueChanged",
- "old": "@interface com\.datastax\.oss\.driver\.api\.mapper\.annotations\..*",
+ "old": "@interface com\\.datastax\\.oss\\.driver\\.api\\.mapper\\.annotations\\..*",
"annotationType": "java.lang.annotation.Retention",
"attribute": "value",
"oldValue": "java.lang.annotation.RetentionPolicy.CLASS",
diff --git a/mapper-runtime/src/main/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.java b/mapper-runtime/src/main/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.java
index 5f16f262032..b4e6960ed66 100644
--- a/mapper-runtime/src/main/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.java
+++ b/mapper-runtime/src/main/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSet.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/DefaultMappedReactiveResultSet.java b/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/DefaultMappedReactiveResultSet.java
index 71452d7a746..e1e701faddd 100644
--- a/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/DefaultMappedReactiveResultSet.java
+++ b/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/DefaultMappedReactiveResultSet.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/FailedMappedReactiveResultSet.java b/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/FailedMappedReactiveResultSet.java
index 9590d597678..3ed27edbf9d 100644
--- a/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/FailedMappedReactiveResultSet.java
+++ b/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/FailedMappedReactiveResultSet.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/ReactiveDaoBase.java b/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/ReactiveDaoBase.java
index f5979cd6fb3..56576829a40 100644
--- a/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/ReactiveDaoBase.java
+++ b/mapper-runtime/src/main/java/com/datastax/dse/driver/internal/mapper/reactive/ReactiveDaoBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperBuilder.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperBuilder.java
index 7e93807afbd..3838892172a 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperBuilder.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperBuilder.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperContext.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperContext.java
index 249eecc0215..9f9df5f93f7 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperContext.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperContext.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperException.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperException.java
index 06b0f1646cf..f659ac00ad5 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperException.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/MapperException.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.java
index 7fd80dfc8e7..cfbf97e73aa 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/ClusteringColumn.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Computed.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Computed.java
index ef9b79f1863..817bbf2c294 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Computed.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Computed.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/CqlName.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/CqlName.java
index 374d0dfe5c1..9b9ef15afb6 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/CqlName.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/CqlName.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Dao.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Dao.java
index 89a9edd2076..bcab01d98fc 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Dao.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Dao.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.java
index 8c886c8c53d..c792c132fb0 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoFactory.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoKeyspace.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoKeyspace.java
index d0935c45fb5..6f24ffa9d56 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoKeyspace.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoKeyspace.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoProfile.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoProfile.java
index 02009897909..66fc3ed433a 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoProfile.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoProfile.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoTable.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoTable.java
index c0e1c882937..7ac0d66dd6c 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoTable.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DaoTable.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.java
index e1f92a761c5..a5c33b3f17f 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/DefaultNullSavingStrategy.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Delete.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Delete.java
index 85b5db6a39e..a9d2c03912f 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Delete.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Delete.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Entity.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Entity.java
index f358e961846..506c7f13d22 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Entity.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Entity.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/GetEntity.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/GetEntity.java
index 0d01b8f373f..d86174bdc49 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/GetEntity.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/GetEntity.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.java
index 74aa433287e..0b064b8597d 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/HierarchyScanStrategy.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Increment.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Increment.java
index c87ccb330b3..bb86fa5b8ab 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Increment.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Increment.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Insert.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Insert.java
index 43675626568..602a673d8a7 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Insert.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Insert.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Mapper.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Mapper.java
index 5463639b8f8..8cdaf28fc51 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Mapper.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Mapper.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/NamingStrategy.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/NamingStrategy.java
index 2970e0e3207..b5121b144b2 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/NamingStrategy.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/NamingStrategy.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.java
index 1cfb4c31812..1dff4280f5b 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PartitionKey.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.java
index ecd699ba93f..4d66fd84e33 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/PropertyStrategy.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Query.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Query.java
index 85be754852b..c362453bb3a 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Query.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Query.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.java
index 64bbeef210a..d8194d12e8b 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/QueryProvider.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SchemaHint.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SchemaHint.java
index c972cdbf936..d680798ba5a 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SchemaHint.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SchemaHint.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Select.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Select.java
index 0e5635cc9e8..46c7994809d 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Select.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Select.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SetEntity.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SetEntity.java
index 818b1272be5..cc1cb9b7e88 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SetEntity.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/SetEntity.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/StatementAttributes.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/StatementAttributes.java
index 8190ebfb18e..56f32432ea8 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/StatementAttributes.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/StatementAttributes.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Transient.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Transient.java
index e88a2f140ab..1db111ccfd2 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Transient.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Transient.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/TransientProperties.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/TransientProperties.java
index f1960613c75..97b8c5c99a2 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/TransientProperties.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/TransientProperties.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Update.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Update.java
index c0d2a697b2d..02930d73aa4 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Update.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/annotations/Update.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/EntityHelper.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/EntityHelper.java
index c80242b0904..653b02c5d0c 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/EntityHelper.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/EntityHelper.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/GetterStyle.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/GetterStyle.java
index 849265f62b4..21e4755f4dd 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/GetterStyle.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/GetterStyle.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NameConverter.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NameConverter.java
index efc3b2d006f..ac9d05895b9 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NameConverter.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NameConverter.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NamingConvention.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NamingConvention.java
index 0a3913aa93e..8846e4f6fcb 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NamingConvention.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/NamingConvention.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/SetterStyle.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/SetterStyle.java
index 4bd9b96b297..26e301c5f76 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/SetterStyle.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/naming/SetterStyle.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.java
index 9b0b668b69e..f2233e5721c 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/entity/saving/NullSavingStrategy.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducer.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducer.java
index 279363ac969..d262986b75f 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducer.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducer.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducerService.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducerService.java
index 6ff193fcf49..b8afdba53b1 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducerService.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/api/mapper/result/MapperResultProducerService.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoBase.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoBase.java
index 48e53852c3f..5f617de52e1 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoBase.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoCacheKey.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoCacheKey.java
index ee6b8f52ac9..32fae259769 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoCacheKey.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DaoCacheKey.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DefaultMapperContext.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DefaultMapperContext.java
index 92555495098..2d09c2e853f 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DefaultMapperContext.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/DefaultMapperContext.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/entity/EntityHelperBase.java b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/entity/EntityHelperBase.java
index 8be10fc15d8..3977ea0c451 100644
--- a/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/entity/EntityHelperBase.java
+++ b/mapper-runtime/src/main/java/com/datastax/oss/driver/internal/mapper/entity/EntityHelperBase.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/DependencyCheckTest.java b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/DependencyCheckTest.java
index 787d88fea4d..03c1e5bb24f 100644
--- a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/DependencyCheckTest.java
+++ b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/DependencyCheckTest.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSetTckTest.java b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSetTckTest.java
index cc62393ade3..efd223b1314 100644
--- a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSetTckTest.java
+++ b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MappedReactiveResultSetTckTest.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockAsyncResultSet.java b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockAsyncResultSet.java
index 058b706ca59..849839b7904 100644
--- a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockAsyncResultSet.java
+++ b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockAsyncResultSet.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockRow.java b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockRow.java
index b3aeddfada6..0c3ead94349 100644
--- a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockRow.java
+++ b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/MockRow.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/TestSubscriber.java b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/TestSubscriber.java
index 0eaaf508fe9..6886b9a7622 100644
--- a/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/TestSubscriber.java
+++ b/mapper-runtime/src/test/java/com/datastax/dse/driver/api/mapper/reactive/TestSubscriber.java
@@ -1,11 +1,13 @@
/*
- * Copyright DataStax, Inc.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,6 +17,8 @@
*/
package com.datastax.dse.driver.api.mapper.reactive;
+import static org.assertj.core.api.Fail.fail;
+
import com.datastax.oss.driver.shaded.guava.common.util.concurrent.Uninterruptibles;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
@@ -68,6 +72,8 @@ public List getElements() {
}
public void awaitTermination() {
- Uninterruptibles.awaitUninterruptibly(latch, 1, TimeUnit.MINUTES);
+ if (!Uninterruptibles.awaitUninterruptibly(latch, 1, TimeUnit.MINUTES)) {
+ fail("subscriber not terminated");
+ }
}
}
diff --git a/mapper-runtime/src/test/resources/project.properties b/mapper-runtime/src/test/resources/project.properties
index a977778735e..66eab90b6e4 100644
--- a/mapper-runtime/src/test/resources/project.properties
+++ b/mapper-runtime/src/test/resources/project.properties
@@ -1,11 +1,13 @@
#
-# Copyright DataStax, Inc.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/metrics/micrometer/pom.xml b/metrics/micrometer/pom.xml
index f1536f493d1..37ba8556a53 100644
--- a/metrics/micrometer/pom.xml
+++ b/metrics/micrometer/pom.xml
@@ -1,13 +1,15 @@
+
+# Java Driver OSGi Tests
This module contains OSGi tests for the driver.
@@ -34,8 +53,8 @@ OSGi ones, you can do so as follows:
You can pass the following system properties to your tests:
1. `ccm.version`: the CCM version to use
-2. `ccm.dse`: whether to use DSE
-3. `osgi.debug`: whether to enable remote debugging of the OSGi container (see
+2. `ccm.distribution`: choose target backend type (e.g. DSE, HCD)
+3. `osgi.debug`: whether to enable remote debugging of the OSGi container (see
below).
## Debugging OSGi tests
@@ -45,4 +64,4 @@ First, you can enable DEBUG logs for the Pax Exam framework by editing the
Alternatively, you can debug the remote OSGi container by passing the system
property `-Dosgi.debug=true`. In this case the framework will prompt for a
-remote debugger on port 5005.
\ No newline at end of file
+remote debugger on port 5005.
diff --git a/osgi-tests/pom.xml b/osgi-tests/pom.xml
index 1e78ce04975..c2cc4d830f1 100644
--- a/osgi-tests/pom.xml
+++ b/osgi-tests/pom.xml
@@ -1,13 +1,15 @@
+
# How to run the Driver duration tests
Note: the procedure described in this page is currently only accessible to DataStax employees.
@@ -10,7 +29,7 @@ a mix of reads, writes, and deletes.
Duration tests are useful to detect performance regressions between 2 different driver versions.
-The Java driver duration tests are stored in a [private
+The Java Driver duration tests are stored in a [private
repository](https://github.com/riptano/driver-examples/tree/java-driver-4.x/java/durationTest/)
accessible only to DataStax employees.
diff --git a/performance/duration-test.yaml b/performance/duration-test.yaml
index 8a50e0de3b5..6e718f2add8 100644
--- a/performance/duration-test.yaml
+++ b/performance/duration-test.yaml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# Possible values: cassandra or dse
server_type: cassandra
# Server version (e.g. 3.11.7 or 6.8.8)
diff --git a/performance/graphite-setup.yaml b/performance/graphite-setup.yaml
index 04c37aecfd9..99bb8ecc8cc 100644
--- a/performance/graphite-setup.yaml
+++ b/performance/graphite-setup.yaml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
# How long should the Graphite server be kept alive, default: 15 days
keep_alive: 15d
# Cloud-specific settings
diff --git a/pom.xml b/pom.xml
index 2ac1715fee9..eb83459cfb4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,13 +1,15 @@
4.0.0
- com.datastax.oss
+
+ org.apache
+ apache
+ 23
+
+ org.apache.cassandra
java-driver-parent
- 4.15.1-SNAPSHOT
+ 4.19.3-SNAPSHOT
pom
- DataStax Java driver for Apache Cassandra(R)
- A driver for Apache Cassandra(R) 2.1+ that works exclusively with the Cassandra Query Language version 3 (CQL3) and Cassandra's native protocol versions 3 and above.
+ Apache Cassandra Java Driver
https://github.com/datastax/java-driver
2017
@@ -34,10 +40,13 @@
mapper-processor
metrics/micrometer
metrics/microprofile
+ guava-shaded
test-infra
integration-tests
osgi-tests
+ distribution-source
distribution
+ distribution-tests
examples
bom
@@ -45,42 +54,45 @@
UTF-8
UTF-8
1.4.1
+
2.1.12
4.1.18
- 4.1.77.Final
+ 4.1.130.Final
1.2.1
- 3.5.3
+ 3.5.6
+
1.7.26
+
1.0.3
- 20210307
- 2.13.2
- 2.13.2.2
- 1.9.12
+ 20230227
+ 2.13.5
+ ${jackson.version}
- 1.1.7.3
- 1.7.1
+ 1.1.10.1
+ 1.10.1
3.19.0
1.3
4.13.2
1.2.3
6.0.0
- 6.0.3
+ 7.0.1
4.13.4
+ 2.6.4
0.11.0
1.1.4
- 2.28
+ 2.31
2.5.0
2.1.1
1.1.4
2.2.2
4.0.3
2.0.0-M19
- 2.22.2
+ 3.0.0
22.0.0.2
false
${skipTests}
@@ -88,7 +100,7 @@
- com.datastax.oss
+ org.apache.cassandra
java-driver-core
${project.version}
test-jar
@@ -99,10 +111,10 @@
${netty.version}
-
+
com.google.guava
guava
- 25.1-jre
+ 33.3.1-jre
com.typesafe
@@ -125,13 +137,14 @@
${snappy.version}
- org.lz4
+ at.yawk.lz4
lz4-java
${lz4.version}
com.github.jnr
jnr-posix
+
3.1.15
@@ -270,12 +283,17 @@
org.ops4j.pax.url
pax-url-wrap
- 2.6.3
+ ${pax-url.version}
org.ops4j.pax.url
pax-url-reference
- 2.6.2
+ ${pax-url.version}
+
+
+ org.ops4j.pax.tinybundles
+ tinybundles
+ 3.0.0
org.glassfish
@@ -433,12 +451,12 @@
io.projectreactor.tools
blockhound
- 1.0.4.RELEASE
+ 1.0.8.RELEASE
io.projectreactor.tools
blockhound-junit-platform
- 1.0.4.RELEASE
+ 1.0.8.RELEASE
@@ -533,34 +551,33 @@
org.jacoco
jacoco-maven-plugin
- 0.8.5
+ 0.8.10
org.apache.felix
maven-bundle-plugin
- 4.2.1
+ 5.1.1
org.revapi
revapi-maven-plugin
- 0.10.5
+ 0.15.1
false
\d+\.\d+\.\d+
-
-
- -
-
-
java.class.externalClassExposedInAPI
-
-
-
+
+
+ ${project.groupId}:${project.artifactId}:RELEASE
+
+
+ revapi.json
+
org.revapi
revapi-java
- 0.22.1
+ 0.28.4
@@ -574,9 +591,33 @@
flatten-maven-plugin
1.2.1
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.5.0
+
+
+ maven-enforcer-plugin
+
+
+ enforce-maven
+
+ enforce
+
+
+
+
+
+ [3.8.1,)
+
+
+
+
+
+
maven-compiler-plugin
@@ -588,6 +629,7 @@
-Xep:FutureReturnValueIgnored:OFF
-Xep:PreferJavaTimeOverload:OFF
-Xep:AnnotateFormatMethod:OFF
+ -Xep:WildcardImport:WARN
-XepExcludedPaths:.*/target/(?:generated-sources|generated-test-sources)/.*
true
@@ -644,13 +686,15 @@
license-maven-plugin
maven-surefire-plugin
+ ${testing.jvm}/bin/java
${project.basedir}/src/test/resources/logback-test.xml
@@ -730,7 +775,7 @@ limitations under the License.]]>
true
ossrh
- https://oss.sonatype.org/
+ https://repository.apache.org/
false
true
@@ -743,6 +788,12 @@ limitations under the License.]]>
jar-no-fork
+
+
+ LICENSE_binary
+ NOTICE_binary.txt
+
+
@@ -770,28 +821,6 @@ limitations under the License.]]>
-
- attach-javadocs
-
- jar
-
-
-
-
- --allow-script-in-comments
-
-
-
check-api-leaks
@@ -891,15 +920,17 @@ height="0" width="0" style="display:none;visibility:hidden">
check
-
-
-
- revapi.json
-
-
+
+ org.apache.maven.plugins
+ maven-remote-resources-plugin
+ 1.7.0
+
+ true
+
+
@@ -936,13 +967,82 @@ height="0" width="0" style="display:none;visibility:hidden">
true
+
+
+ test-jdk-environment
+
+
+ !testJavaHome
+
+
+
+ ${env.JAVA_HOME}
+
+
+
+
+ test-jdk-specified
+
+
+ testJavaHome
+
+
+
+ ${testJavaHome}
+
+
+
+
+ test-jdk-8
+
+ [8,)
+
+
+
+
+ test-jdk-11
+
+ [11,)
+
+
+
+
+ test-jdk-14
+
+ [14,)
+
+
+
+ -XX:+AllowRedefinitionToAddDeleteMethods
+
+
+
+
+ test-jdk-17
+
+ [17,)
+
+
+
+ -XX:+AllowRedefinitionToAddDeleteMethods
+
+ --add-opens java.base/jdk.internal.util.random=ALL-UNNAMED
+
+
+
+
+ test-jdk-21
+
+ [21,)
+
+
+
+ -XX:+AllowRedefinitionToAddDeleteMethods
+
+ --add-opens=java.base/jdk.internal.util.random=ALL-UNNAMED
+
+
-
-
- ossrh
- https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
-
Apache 2
diff --git a/pre-commit.sh b/pre-commit.sh
index c87ea5bf9ca..912564ae81e 100755
--- a/pre-commit.sh
+++ b/pre-commit.sh
@@ -1,4 +1,20 @@
#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
# STASH_NAME="pre-commit-$(date +%s)"
# git stash save --keep-index $STASH_NAME
diff --git a/query-builder/pom.xml b/query-builder/pom.xml
index 96559c8588e..2bfe1bee8f5 100644
--- a/query-builder/pom.xml
+++ b/query-builder/pom.xml
@@ -1,13 +1,15 @@
+
## Upgrade guide
+### 4.18.1
+
+#### Keystore reloading in DefaultSslEngineFactory
+
+`DefaultSslEngineFactory` now includes an optional keystore reloading interval, for detecting changes in the local
+client keystore file. This is relevant in environments with mTLS enabled and short-lived client certificates, especially
+when an application restart might not always happen between a new keystore becoming available and the previous
+keystore certificate expiring.
+
+This feature is disabled by default for compatibility. To enable, see `keystore-reload-interval` in `reference.conf`.
+
+### 4.17.0
+
+#### Support for Java17
+
+With the completion of [JAVA-3042](https://datastax-oss.atlassian.net/browse/JAVA-3042) the driver now passes our automated test matrix for Java Driver releases.
+If you discover an issue with the Java Driver running on Java 17, please let us know. We will triage and address Java 17 issues.
+
+#### Updated API for vector search
+
+The 4.16.0 release introduced support for the CQL `vector` datatype. This release modifies the `CqlVector`
+value type used to represent a CQL vector to make it easier to use. `CqlVector` now implements the Iterable interface
+as well as several methods modelled on the JDK's List interface. For more, see
+[JAVA-3060](https://datastax-oss.atlassian.net/browse/JAVA-3060).
+
+The builder interface was replaced with factory methods that resemble similar methods on `CqlDuration`.
+For example, the following code will create a keyspace and table, populate that table with some data, and then execute
+a query that will return a `vector` type. This data is retrieved directly via `Row.getVector()` and the resulting
+`CqlVector` value object can be interrogated directly.
+
+```java
+try (CqlSession session = new CqlSessionBuilder().withLocalDatacenter("datacenter1").build()) {
+
+ session.execute("DROP KEYSPACE IF EXISTS test");
+ session.execute("CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}");
+ session.execute("CREATE TABLE test.foo(i int primary key, j vector)");
+ session.execute("CREATE CUSTOM INDEX ann_index ON test.foo(j) USING 'StorageAttachedIndex'");
+ session.execute("INSERT INTO test.foo (i, j) VALUES (1, [8, 2.3, 58])");
+ session.execute("INSERT INTO test.foo (i, j) VALUES (2, [1.2, 3.4, 5.6])");
+ session.execute("INSERT INTO test.foo (i, j) VALUES (5, [23, 18, 3.9])");
+ ResultSet rs=session.execute("SELECT j FROM test.foo WHERE j ann of [3.4, 7.8, 9.1] limit 1");
+ for (Row row : rs){
+ CqlVector v = row.getVector(0, Float.class);
+ System.out.println(v);
+ if (Iterables.size(v) != 3) {
+ throw new RuntimeException("Expected vector with three dimensions");
+ }
+ }
+}
+```
+
+You can also use the `CqlVector` type with prepared statements:
+
+```java
+PreparedStatement preparedInsert = session.prepare("INSERT INTO test.foo (i, j) VALUES (?,?)");
+CqlVector vector = CqlVector.newInstance(1.4f, 2.5f, 3.6f);
+session.execute(preparedInsert.bind(3, vector));
+```
+
+In some cases, it makes sense to access the vector directly as an array of some numerical type. This version
+supports such use cases by providing a codec which translates a CQL vector to and from a primitive array. Only float arrays are supported.
+You can find more information about this codec in the manual documentation on [custom codecs](../manual/core/custom_codecs/)
+
### 4.15.0
#### CodecNotFoundException now extends DriverException
@@ -15,7 +97,7 @@ a logic such as below, it won't compile anymore:
```java
try {
- doSomethingWithDriver();
+ doSomethingWithDriver();
} catch(DriverException e) {
} catch(CodecNotFoundException e) {
}
@@ -25,7 +107,7 @@ You need to either reverse the catch order and catch `CodecNotFoundException` fi
```java
try {
- doSomethingWithDriver();
+ doSomethingWithDriver();
} catch(CodecNotFoundException e) {
} catch(DriverException e) {
}
@@ -35,7 +117,7 @@ Or catch only `DriverException`:
```java
try {
- doSomethingWithDriver();
+ doSomethingWithDriver();
} catch(DriverException e) {
}
```
@@ -51,7 +133,7 @@ request cannot be executed because all nodes tried were busy. Previously you wou
#### Esri Geometry dependency now optional
-Previous versions of the Java driver defined a mandatory dependency on the Esri geometry library.
+Previous versions of the Java Driver defined a mandatory dependency on the Esri geometry library.
This library offered support for primitive geometric types supported by DSE. As of driver 4.14.0
this dependency is now optional.
@@ -229,16 +311,16 @@ The above can also be achieved by an adapter class as shown below:
```java
public class NodeFilterToDistanceEvaluatorAdapter implements NodeDistanceEvaluator {
- private final Predicate nodeFilter;
+ private final Predicate nodeFilter;
- public NodeFilterToDistanceEvaluatorAdapter(@NonNull Predicate nodeFilter) {
- this.nodeFilter = nodeFilter;
- }
+ public NodeFilterToDistanceEvaluatorAdapter(@NonNull Predicate nodeFilter) {
+ this.nodeFilter = nodeFilter;
+ }
- @Nullable @Override
- public NodeDistance evaluateDistance(@NonNull Node node, @Nullable String localDc) {
- return nodeFilter.test(node) ? null : NodeDistance.IGNORED;
- }
+ @Nullable @Override
+ public NodeDistance evaluateDistance(@NonNull Node node, @Nullable String localDc) {
+ return nodeFilter.test(node) ? null : NodeDistance.IGNORED;
+ }
}
```
@@ -531,7 +613,7 @@ import com.datastax.driver.core.Row;
import com.datastax.driver.core.SimpleStatement;
SimpleStatement statement =
- new SimpleStatement("SELECT release_version FROM system.local");
+ new SimpleStatement("SELECT release_version FROM system.local");
ResultSet resultSet = session.execute(statement);
Row row = resultSet.one();
System.out.println(row.getString("release_version"));
@@ -543,7 +625,7 @@ import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.core.cql.SimpleStatement;
SimpleStatement statement =
- SimpleStatement.newInstance("SELECT release_version FROM system.local");
+ SimpleStatement.newInstance("SELECT release_version FROM system.local");
ResultSet resultSet = session.execute(statement);
Row row = resultSet.one();
System.out.println(row.getString("release_version"));
@@ -606,9 +688,9 @@ datastax-java-driver {
// Application code:
SimpleStatement statement1 =
- SimpleStatement.newInstance("...").setExecutionProfileName("profile1");
+ SimpleStatement.newInstance("...").setExecutionProfileName("profile1");
SimpleStatement statement2 =
- SimpleStatement.newInstance("...").setExecutionProfileName("profile2");
+ SimpleStatement.newInstance("...").setExecutionProfileName("profile2");
```
The configuration can be reloaded periodically at runtime:
@@ -727,13 +809,13 @@ propagating its own consistency level to its bound statements:
```java
PreparedStatement ps1 =
- session.prepare(
- SimpleStatement.newInstance("SELECT * FROM product WHERE sku = ?")
- .setConsistencyLevel(DefaultConsistencyLevel.ONE));
+ session.prepare(
+ SimpleStatement.newInstance("SELECT * FROM product WHERE sku = ?")
+ .setConsistencyLevel(DefaultConsistencyLevel.ONE));
PreparedStatement ps2 =
- session.prepare(
- SimpleStatement.newInstance("SELECT * FROM product WHERE sku = ?")
- .setConsistencyLevel(DefaultConsistencyLevel.TWO));
+ session.prepare(
+ SimpleStatement.newInstance("SELECT * FROM product WHERE sku = ?")
+ .setConsistencyLevel(DefaultConsistencyLevel.TWO));
assert ps1 != ps2;
@@ -834,8 +916,8 @@ Optional ks = metadata.getKeyspace("test");
assert !ks.isPresent();
session.execute(
- "CREATE KEYSPACE IF NOT EXISTS test "
- + "WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}");
+ "CREATE KEYSPACE IF NOT EXISTS test "
+ + "WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}");
// This is still the same metadata from before the CREATE
ks = metadata.getKeyspace("test");