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/.github/workflows/snyk-cli-scan.yml b/.github/workflows/snyk-cli-scan.yml
deleted file mode 100644
index 50d303a128b..00000000000
--- a/.github/workflows/snyk-cli-scan.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: 🔬 Snyk cli SCA
-
-on:
- push:
- branches: [ 4.x ]
- pull_request:
- branches: [ 4.x ]
- workflow_dispatch:
-
-env:
- SNYK_SEVERITY_THRESHOLD_LEVEL: high
-
-jobs:
- snyk-cli-scan:
- runs-on: ubuntu-latest
- steps:
- - name: Git checkout
- uses: actions/checkout@v3
-
- - name: prepare for snyk scan
- uses: datastax/shared-github-actions/actions/snyk-prepare@main
-
- - name: Set up JDK 8
- uses: actions/setup-java@v3
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: maven
-
- - name: run maven install prepare for snyk
- run: |
- mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
-
- - name: snyk scan java
- uses: datastax/shared-github-actions/actions/snyk-scan-java@main
- with:
- directories: .
- SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- SNYK_ORG_ID: ${{ secrets.SNYK_ORG_ID }}
- extra-snyk-options: "-DskipTests -Dmaven.javadoc.skip=true"
-
- - name: Snyk scan result
- uses: datastax/shared-github-actions/actions/snyk-process-scan-results@main
- with:
- gh_repo_token: ${{ secrets.GITHUB_TOKEN }}
- SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- SNYK_ORG_ID: ${{ secrets.SNYK_ORG_ID }}
diff --git a/.github/workflows/snyk-pr-cleanup.yml b/.github/workflows/snyk-pr-cleanup.yml
deleted file mode 100644
index 9c3136bef82..00000000000
--- a/.github/workflows/snyk-pr-cleanup.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: 🗑️ Snyk PR cleanup - merged/closed
-
-on:
- pull_request:
- types:
- - closed
- branches:
- - 4.x
- workflow_dispatch:
-
-jobs:
- snyk_project_cleanup_when_pr_closed:
- uses: datastax/shared-github-actions/.github/workflows/snyk-pr-cleanup.yml@main
- secrets:
- snyk_token: ${{ secrets.SNYK_TOKEN }}
- snyk_org_id: ${{ secrets.SNYK_ORG_ID }}
diff --git a/.snyk b/.snyk
index 3c6284addca..a081b17225c 100644
--- a/.snyk
+++ b/.snyk
@@ -1,3 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this 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
diff --git a/.snyk.ignore.example b/.snyk.ignore.example
deleted file mode 100644
index a4690b27223..00000000000
--- a/.snyk.ignore.example
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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-PYTHON-URLLIB3-1533435:
- - '*':
- reason: state your ignore reason here
- expires: 2030-01-01T00:00:00.000Z
- created: 2022-03-21T00:00:00.000Z
\ No newline at end of file
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 80%
rename from Jenkinsfile
rename to Jenkinsfile-datastax
index 3ecb70e0d30..602f33101ca 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile-datastax
@@ -1,22 +1,33 @@
#!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}"
/*
@@ -43,13 +54,7 @@ def initializeEnvironment() {
. ${JABBA_SHELL}
jabba which 1.8''', returnStdout: true).trim()
- env.TEST_JAVA_HOME = sh(label: 'Get TEST_JAVA_HOME',script: '''#!/bin/bash -le
- . ${JABBA_SHELL}
- jabba which ${JABBA_VERSION}''', returnStdout: true).trim()
- env.TEST_JAVA_VERSION = sh(label: 'Get TEST_JAVA_VERSION',script: '''#!/bin/bash -le
- echo "${JABBA_VERSION##*.}"''', 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 1.8
. ${CCM_ENVIRONMENT_SHELL} ${SERVER_VERSION}
@@ -63,13 +68,26 @@ CCM_CASSANDRA_VERSION=${DSE_FIXED_VERSION} # maintain for backwards compatibilit
CCM_VERSION=${DSE_FIXED_VERSION}
CCM_SERVER_TYPE=dse
DSE_VERSION=${DSE_FIXED_VERSION}
-CCM_IS_DSE=true
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
@@ -86,18 +104,25 @@ ENVIRONMENT_EOF
}
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
@@ -119,18 +144,20 @@ def executeTests() {
printenv | sort
mvn -B -V ${INTEGRATION_TESTS_FILTER_ARGUMENT} -T 1 verify \
- -Ptest-jdk-${TEST_JAVA_VERSION} \
- -DtestJavaHome=${TEST_JAVA_HOME} \
+ -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() {
@@ -234,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Ⓡ
+ 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
@@ -255,24 +282,16 @@ 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.16
@@ -298,17 +317,23 @@ pipeline {
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.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
@@ -321,34 +346,18 @@ 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.14
- OpenJDK version 14
-
openjdk@1.17
OpenJDK version 17
+
+ openjdk@1.21
+ OpenJDK version 21
+
''')
booleanParam(
name: 'SKIP_SERIAL_ITS',
@@ -384,19 +393,16 @@ 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.18 and DSE 6.7
- H 2 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;CI_SCHEDULE_SERVER_VERSIONS=2.1 3.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
- ### 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.30;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.30;CI_SCHEDULE_JABBA_VERSION=openjdk@1.14
+ # 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}"
@@ -425,15 +431,18 @@ pipeline {
axes {
axis {
name 'SERVER_VERSION'
- values '3.11', // Latest stable Apache CassandraⓇ
- '4.0', // Development Apache CassandraⓇ
- 'dse-6.8.30' // 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.17', // jdk17
+ 'openjdk@1.21' // jdk21
}
}
@@ -459,7 +468,7 @@ pipeline {
}
stage('Build-Driver') {
steps {
- buildDriver('default')
+ buildDriver('1.8')
}
}
stage('Execute-Tests') {
@@ -533,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Ⓡ
+ 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.8.30', // Current DataStax Enterprise
+ 'dse-6.9.0', // Current DataStax Enterprise
+ 'hcd-1.0.0' // Current DataStax HCD
}
}
when {
@@ -573,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 e8a85027ab9..d8ef01d0964 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
-# 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
@@ -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,44 +58,31 @@ 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.
-## Error Handling
-
-See the [Cassandra error handling done right blog](https://www.datastax.com/blog/cassandra-error-handling-done-right) for error handling with the DataStax Java Driver for Apache Cassandra™.
-
## Useful links
* [Manual](manual/)
* [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.17
-[JIRA]: https://datastax-oss.atlassian.net/browse/JAVA
+[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.
@@ -112,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 a60b9903fdc..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
@@ -632,6 +717,15 @@ 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
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 5d0c902f31b..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 a1f857ac0f4..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 00d07f29c16..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 30f3207d06c..e302e12077f 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.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 15a71eb76c5..e9dbf1bf9a8 100644
--- a/manual/case_sensitivity/README.md
+++ b/manual/case_sensitivity/README.md
@@ -1,3 +1,22 @@
+
+
## Case sensitivity
### In Cassandra
@@ -117,7 +136,7 @@ For "consuming" methods, string overloads are also provided for convenience, for
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 a11c5e624be..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}
@@ -330,4 +349,4 @@ for (ColumnDefinitions.Definition definition : row.getColumnDefinitions()) {
[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
\ No newline at end of file
+[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 433ffe58a75..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
diff --git a/manual/core/async/README.md b/manual/core/async/README.md
index d64ee2c9b85..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.17/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 ebb52bfc5a8..516e47f558f 100644
--- a/manual/core/authentication/README.md
+++ b/manual/core/authentication/README.md
@@ -1,3 +1,22 @@
+
+
## Authentication
### Quick overview
@@ -236,4 +255,4 @@ session.execute(statement);
[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/
\ No newline at end of file
+[reference.conf]: ../configuration/reference/
diff --git a/manual/core/bom/README.md b/manual/core/bom/README.md
index d0797264263..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,7 +30,7 @@ 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.17.0
pom
@@ -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
@@ -70,7 +89,7 @@ good idea to extract a property to keep it in sync with the BOM:
- 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 bccfb7d3fce..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
...
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 570919fdc94..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.17/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 e68e5d78029..f3b7be1e3d9 100644
--- a/manual/core/custom_codecs/README.md
+++ b/manual/core/custom_codecs/README.md
@@ -1,3 +1,22 @@
+
+
## Custom codecs
### Quick overview
@@ -726,4 +745,4 @@ private static String formatRow(Row row) {
[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 3218eecc5e6..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,7 +150,7 @@ 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
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 79a4c034052..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],
diff --git a/manual/core/dse/graph/README.md b/manual/core/dse/graph/README.md
index 9d6ef39f2f3..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
diff --git a/manual/core/dse/graph/fluent/README.md b/manual/core/dse/graph/fluent/README.md
index 9201470b6a5..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
diff --git a/manual/core/dse/graph/fluent/explicit/README.md b/manual/core/dse/graph/fluent/explicit/README.md
index f3d8072dcb9..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:
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 9e1a357a443..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[] |
@@ -141,4 +160,4 @@ UUID uuid = graphNode.as(UUID.class);
[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 2b98664ea16..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,
@@ -103,4 +122,4 @@ Note however that some types of queries can only be performed through the script
[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-
\ No newline at end of file
+[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 3746825390a..be784dfa40b 100644
--- a/manual/core/idempotence/README.md
+++ b/manual/core/idempotence/README.md
@@ -1,3 +1,22 @@
+
+
## Query idempotence
### Quick overview
diff --git a/manual/core/integration/README.md b/manual/core/integration/README.md
index 32237df8818..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}
@@ -589,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}
@@ -610,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
@@ -655,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/).
diff --git a/manual/core/load_balancing/README.md b/manual/core/load_balancing/README.md
index 2b60dcb1580..3f391c14f56 100644
--- a/manual/core/load_balancing/README.md
+++ b/manual/core/load_balancing/README.md
@@ -1,3 +1,22 @@
+
+
## Load balancing
### Quick overview
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 1bb07483869..73609ee0542 100644
--- a/manual/core/metadata/README.md
+++ b/manual/core/metadata/README.md
@@ -1,3 +1,22 @@
+
+
## Metadata
### Quick overview
@@ -58,4 +77,4 @@ refreshed. See the [Performance](../performance/#debouncing) page for more detai
[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
\ No newline at end of file
+[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 0f0b6176f42..fea04e5f262 100644
--- a/manual/core/metadata/node/README.md
+++ b/manual/core/metadata/node/README.md
@@ -1,3 +1,22 @@
+
+
## Node metadata
### Quick overview
diff --git a/manual/core/metadata/schema/README.md b/manual/core/metadata/schema/README.md
index ed2c4c70750..20521d1def4 100644
--- a/manual/core/metadata/schema/README.md
+++ b/manual/core/metadata/schema/README.md
@@ -1,3 +1,22 @@
+
+
## Schema metadata
### Quick overview
diff --git a/manual/core/metadata/token/README.md b/manual/core/metadata/token/README.md
index 1c6a9c08ae7..4d7cd9252df 100644
--- a/manual/core/metadata/token/README.md
+++ b/manual/core/metadata/token/README.md
@@ -1,3 +1,22 @@
+
+
## Token metadata
### Quick overview
@@ -170,4 +189,4 @@ also be unavailable for the excluded keyspaces.
[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
\ No newline at end of file
+[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 73f5cad3f21..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,7 +40,7 @@ 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 Âą |
diff --git a/manual/core/non_blocking/README.md b/manual/core/non_blocking/README.md
index a40779f8e11..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
@@ -133,15 +152,13 @@ should not be used if strict lock-freedom is enforced.
[`SafeInitNodeStateListener`]: https://docs.datastax.com/en/drivers/java/4.17/com/datastax/oss/driver/api/core/metadata/SafeInitNodeStateListener.html
-The same is valid for both built-in [request throttlers]:
-
-* `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.17/com/datastax/oss/driver/api/core/session/throttling/RequestThrottler.html
diff --git a/manual/core/paging/README.md b/manual/core/paging/README.md
index 761a6bfbc66..2df92bd69d1 100644
--- a/manual/core/paging/README.md
+++ b/manual/core/paging/README.md
@@ -1,3 +1,22 @@
+
+
## Paging
### Quick overview
diff --git a/manual/core/performance/README.md b/manual/core/performance/README.md
index aaaebdaa6c9..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
@@ -349,4 +368,4 @@ the only one that will have to stay on a separate thread.
[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-
\ No newline at end of file
+[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 ad9e6f97a02..578de6b4abd 100644
--- a/manual/core/pooling/README.md
+++ b/manual/core/pooling/README.md
@@ -1,3 +1,22 @@
+
+
## Connection pooling
### Quick overview
@@ -171,4 +190,4 @@ Try adding more connections per node. Thanks to the driver's hot-reload mechanis
at runtime and see the effects immediately.
[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
\ No newline at end of file
+[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 c851e023e14..4498afe21c4 100644
--- a/manual/core/query_timestamps/README.md
+++ b/manual/core/query_timestamps/README.md
@@ -1,3 +1,22 @@
+
+
## Query timestamps
### Quick overview
diff --git a/manual/core/reactive/README.md b/manual/core/reactive/README.md
index d0182c4fbc2..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
diff --git a/manual/core/reconnection/README.md b/manual/core/reconnection/README.md
index b27dd19aa27..3eb6dad9c05 100644
--- a/manual/core/reconnection/README.md
+++ b/manual/core/reconnection/README.md
@@ -1,3 +1,22 @@
+
+
## Reconnection
### Quick overview
@@ -87,4 +106,4 @@ was established.
[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
\ No newline at end of file
+[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 0862654e53f..c135abfe53f 100644
--- a/manual/core/request_tracker/README.md
+++ b/manual/core/request_tracker/README.md
@@ -1,3 +1,22 @@
+
+
## Request tracker
### Quick overview
@@ -124,4 +143,4 @@ com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Undefined c
```
[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-
\ No newline at end of file
+[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 cdd3a5740a2..e92f8e214aa 100644
--- a/manual/core/retries/README.md
+++ b/manual/core/retries/README.md
@@ -1,3 +1,22 @@
+
+
## Retries
### Quick overview
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 53913a6eda7..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.17/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 37396c6d4c0..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
}
}
```
diff --git a/manual/core/statements/README.md b/manual/core/statements/README.md
index f02806fb940..394e81ae00e 100644
--- a/manual/core/statements/README.md
+++ b/manual/core/statements/README.md
@@ -1,3 +1,22 @@
+
+
## Statements
### Quick overview
diff --git a/manual/core/statements/batch/README.md b/manual/core/statements/batch/README.md
index 05e803770eb..f080fe16ab0 100644
--- a/manual/core/statements/batch/README.md
+++ b/manual/core/statements/batch/README.md
@@ -1,3 +1,22 @@
+
+
## Batch statements
### Quick overview
diff --git a/manual/core/statements/per_query_keyspace/README.md b/manual/core/statements/per_query_keyspace/README.md
index f9076b5b5b6..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
@@ -126,4 +145,4 @@ the norm, we'll probably deprecate `setRoutingKeyspace()`.
[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 d5a4739c11b..5a87b238cbc 100644
--- a/manual/core/statements/prepared/README.md
+++ b/manual/core/statements/prepared/README.md
@@ -1,3 +1,22 @@
+
+
## Prepared statements
### Quick overview
diff --git a/manual/core/statements/simple/README.md b/manual/core/statements/simple/README.md
index df56698b4ee..13ddbb7a389 100644
--- a/manual/core/statements/simple/README.md
+++ b/manual/core/statements/simple/README.md
@@ -1,3 +1,22 @@
+
+
## Simple statements
### Quick overview
diff --git a/manual/core/temporal_types/README.md b/manual/core/temporal_types/README.md
index 2128f822694..6542d5b8dac 100644
--- a/manual/core/temporal_types/README.md
+++ b/manual/core/temporal_types/README.md
@@ -1,3 +1,22 @@
+
+
## Temporal types
### Quick overview
@@ -149,4 +168,4 @@ System.out.println(dateTime.minus(CqlDuration.from("1h15s15ns")));
[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-
\ No newline at end of file
+[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 0e1605dafb5..275c0cb5b40 100644
--- a/manual/core/throttling/README.md
+++ b/manual/core/throttling/README.md
@@ -1,3 +1,22 @@
+
+
## Request throttling
### Quick overview
@@ -147,4 +166,4 @@ size the underlying histograms (`metrics.session.throttling.delay.*`).
[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
\ No newline at end of file
+[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 f3154600f9f..f9beca8e49b 100644
--- a/manual/core/tracing/README.md
+++ b/manual/core/tracing/README.md
@@ -1,3 +1,22 @@
+
+
## Query tracing
### Quick overview
diff --git a/manual/core/tuples/README.md b/manual/core/tuples/README.md
index 69c2f24a46b..d0684b77569 100644
--- a/manual/core/tuples/README.md
+++ b/manual/core/tuples/README.md
@@ -1,3 +1,22 @@
+
+
## Tuples
### Quick overview
diff --git a/manual/core/udts/README.md b/manual/core/udts/README.md
index f45cf658b89..a22057030ae 100644
--- a/manual/core/udts/README.md
+++ b/manual/core/udts/README.md
@@ -1,3 +1,22 @@
+
+
## User-defined types
### Quick overview
@@ -136,4 +155,4 @@ 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.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
\ No newline at end of file
+[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 a09d1c9fd63..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
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 cbda8f794ff..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
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 4ee234ffa14..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}
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 7466812fc9b..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
diff --git a/manual/mapper/config/scala/README.md b/manual/mapper/config/scala/README.md
index b043bd784ad..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
diff --git a/manual/mapper/daos/README.md b/manual/mapper/daos/README.md
index e76dde55314..d12172bf056 100644
--- a/manual/mapper/daos/README.md
+++ b/manual/mapper/daos/README.md
@@ -1,3 +1,22 @@
+
+
## DAOs
### Quick overview
diff --git a/manual/mapper/daos/custom_types/README.md b/manual/mapper/daos/custom_types/README.md
index 75e9733cb2f..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
diff --git a/manual/mapper/daos/delete/README.md b/manual/mapper/daos/delete/README.md
index 10f4ad249d2..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):
@@ -163,4 +182,4 @@ entity class and the [naming strategy](../../entities/#naming-strategy)).
[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 cea11e34d17..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);
diff --git a/manual/mapper/daos/increment/README.md b/manual/mapper/daos/increment/README.md
index c8e90a51627..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
diff --git a/manual/mapper/daos/insert/README.md b/manual/mapper/daos/insert/README.md
index bfd95229e1b..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):
diff --git a/manual/mapper/daos/null_saving/README.md b/manual/mapper/daos/null_saving/README.md
index e2858f43b4d..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
diff --git a/manual/mapper/daos/query/README.md b/manual/mapper/daos/query/README.md
index 0d4293b5f15..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:
diff --git a/manual/mapper/daos/queryprovider/README.md b/manual/mapper/daos/queryprovider/README.md
index 7c750bcce1f..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
diff --git a/manual/mapper/daos/select/README.md b/manual/mapper/daos/select/README.md
index 9d5357ad546..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
diff --git a/manual/mapper/daos/setentity/README.md b/manual/mapper/daos/setentity/README.md
index cedb6e3dc45..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
diff --git a/manual/mapper/daos/statement_attributes/README.md b/manual/mapper/daos/statement_attributes/README.md
index aa11e065b4f..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.17/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 6a14a4a6140..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
diff --git a/manual/mapper/entities/README.md b/manual/mapper/entities/README.md
index b857203ef32..978c781245f 100644
--- a/manual/mapper/entities/README.md
+++ b/manual/mapper/entities/README.md
@@ -1,3 +1,22 @@
+
+
## Entities
### Quick overview
diff --git a/manual/mapper/mapper/README.md b/manual/mapper/mapper/README.md
index 18be59df1c4..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();
diff --git a/manual/osgi/README.md b/manual/osgi/README.md
index 88254334f25..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
diff --git a/manual/query_builder/README.md b/manual/query_builder/README.md
index b9ea6a36205..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}
diff --git a/manual/query_builder/condition/README.md b/manual/query_builder/condition/README.md
index 0530b33d5bc..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
diff --git a/manual/query_builder/delete/README.md b/manual/query_builder/delete/README.md
index 031291c311f..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
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 ede99602af0..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.17/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 3c72e28cbee..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
diff --git a/manual/query_builder/schema/README.md b/manual/query_builder/schema/README.md
index e4021c3068f..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
diff --git a/manual/query_builder/schema/aggregate/README.md b/manual/query_builder/schema/aggregate/README.md
index 42f1952a105..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
diff --git a/manual/query_builder/schema/function/README.md b/manual/query_builder/schema/function/README.md
index 7d02f0f8349..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
diff --git a/manual/query_builder/schema/index/README.md b/manual/query_builder/schema/index/README.md
index 8541831c1f2..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
diff --git a/manual/query_builder/schema/keyspace/README.md b/manual/query_builder/schema/keyspace/README.md
index 25e165f32c1..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
diff --git a/manual/query_builder/schema/materialized_view/README.md b/manual/query_builder/schema/materialized_view/README.md
index 7bcdda0bd3f..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
diff --git a/manual/query_builder/schema/table/README.md b/manual/query_builder/schema/table/README.md
index 8a68d676851..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,
diff --git a/manual/query_builder/schema/type/README.md b/manual/query_builder/schema/type/README.md
index e474dc29419..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.
diff --git a/manual/query_builder/select/README.md b/manual/query_builder/select/README.md
index 19f0085508a..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
diff --git a/manual/query_builder/term/README.md b/manual/query_builder/term/README.md
index 214dedb3274..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:
@@ -106,4 +125,4 @@ execution time; on the other hand, it can be used as a workaround to handle new
are not yet covered by the query builder.
[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
\ No newline at end of file
+[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 9b37160c0c9..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
diff --git a/manual/query_builder/update/README.md b/manual/query_builder/update/README.md
index d85f71f11cc..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
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 70a319b7775..04d8c98c4f0 100644
--- a/mapper-processor/pom.xml
+++ b/mapper-processor/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 c80bca37e1d..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 19adba12170..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.17.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,32 +54,35 @@
UTF-8
UTF-8
1.4.1
+
2.1.12
4.1.18
- 4.1.94.Final
+ 4.1.130.Final
1.2.1
3.5.6
+
1.7.26
+
1.0.3
20230227
- 2.13.2
- 2.13.2.2
- 1.9.12
+ 2.13.5
+ ${jackson.version}
1.1.10.1
- 1.7.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.31
@@ -80,7 +92,7 @@
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
@@ -543,24 +561,23 @@
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
@@ -645,13 +686,15 @@
license-maven-plugin
maven-surefire-plugin
+ ${testing.jvm}/bin/java
${project.basedir}/src/test/resources/logback-test.xml
@@ -731,7 +775,7 @@ limitations under the License.]]>
true
ossrh
- https://oss.sonatype.org/
+ https://repository.apache.org/
false
true
@@ -744,6 +788,12 @@ limitations under the License.]]>
jar-no-fork
+
+
+ LICENSE_binary
+ NOTICE_binary.txt
+
+
@@ -771,28 +821,6 @@ limitations under the License.]]>
-
- attach-javadocs
-
- jar
-
-
-
-
- --allow-script-in-comments
-
-
-
check-api-leaks
@@ -892,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
+
+
@@ -975,6 +1005,17 @@ height="0" width="0" style="display:none;visibility:hidden">
[11,)
+
+
+ test-jdk-14
+
+ [14,)
+
+
+
+ -XX:+AllowRedefinitionToAddDeleteMethods
+
+
test-jdk-17
@@ -988,13 +1029,20 @@ height="0" width="0" style="display:none;visibility:hidden">
--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 d5b53451712..2bfe1bee8f5 100644
--- a/query-builder/pom.xml
+++ b/query-builder/pom.xml
@@ -1,13 +1,15 @@
+
## Upgrade guide
-### 4.17.0
+### 4.18.1
+
+#### Keystore reloading in DefaultSslEngineFactory
-#### Beta support for Java17
+`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
-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.
-While all features function normally when run with Java 17 tests, we do not offer full support for this
-platform until we've received feedback from other users in the ecosystem.
+#### Support for Java17
-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.
+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
@@ -28,7 +55,7 @@ try (CqlSession session = new CqlSessionBuilder().withLocalDatacenter("datacente
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("CREAT CUSTOM INDEX ann_index ON test.foo(j) USING 'StorageAttachedIndex'");
+ 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])");
@@ -106,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.