Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
with:
python-version: '3.13'

- name: Set up JDK 8.0
- name: Set up JDK 11
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'

- name: Install uv
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
with:
python-version: '3.13'

- name: Set up JDK 8.0
- name: Set up JDK 11
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'

- name: Install uv
Expand All @@ -44,4 +44,4 @@ jobs:
run: make -C docs setupenv

- name: Build docs
run: make -C docs test
run: make -C docs test
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
RELEASE_TARGET_TAG: ${{ inputs.target-tag }}
run: make checkout-one-commit-before

- name: Set up Java
- name: Set up JDK 11
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
server-id: central
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
39 changes: 29 additions & 10 deletions .github/workflows/tests@v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ jobs:

strategy:
matrix:
java-version: [8]
java-version: [11, 17]
fail-fast: false

steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
Expand Down Expand Up @@ -80,7 +82,7 @@ jobs:

strategy:
matrix:
java-version: [8]
java-version: [11, 17]
fail-fast: false

steps:
Expand Down Expand Up @@ -109,14 +111,16 @@ jobs:

strategy:
matrix:
java-version: [8]
java-version: [11, 17]
fail-fast: false

steps:
- name: Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
persist-credentials: false

- name: Set up JDK 8
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java-version }}
Expand All @@ -142,14 +146,14 @@ jobs:
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: test-results
name: test-results-${{ matrix.java-version }}
path: "*/**/target/*-reports/*.xml"

- name: Parse test results
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2
if: always()
with:
check_name: Unit tests report
check_name: Unit tests report (JDK ${{ matrix.java-version }})
require_tests: true
report_paths: "*/**/target/*-reports/*.xml"
follow_symlink: true
Expand Down Expand Up @@ -180,8 +184,13 @@ jobs:
strategy:
matrix:
cassandra-version: [3-LATEST, 4-LATEST]
java-version: [8]
java-version: [11, 17]
test-group: [parallelizable, serial, isolated]
exclude:
- cassandra-version: 3-LATEST
java-version: 17
- cassandra-version: 4-LATEST
java-version: 11
fail-fast: false

steps:
Expand Down Expand Up @@ -212,6 +221,7 @@ jobs:
id: cassandra-version
env:
CASSANDRA_VERSION: ${{ matrix.cassandra-version }}
GET_VERSION_VERSION: 0.4.5
GH_TOKEN: ${{ github.token }}
run: make resolve-cassandra-version

Expand All @@ -226,6 +236,7 @@ jobs:
if: steps.ccm-cache.outputs.cache-hit != 'true'
env:
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.outputs.value }}
GET_VERSION_VERSION: 0.4.5
run: make download-cassandra

- name: Save CCM image into the cache
Expand All @@ -249,6 +260,7 @@ jobs:
env:
CASSANDRA_VERSION: ${{ matrix.cassandra-version }}
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.outputs.value }}
GET_VERSION_VERSION: 0.4.5
GH_TOKEN: ${{ github.token }}
MAVEN_EXTRA_ARGS: ${{ steps.test-skip-args.outputs.value }}
run: make test-integration-cassandra
Expand Down Expand Up @@ -278,7 +290,7 @@ jobs:
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2
if: always()
with:
check_name: Integration tests report for Cassandra ${{ steps.cassandra-version.outputs.value }} (${{ matrix.test-group }})
check_name: Integration tests report for Cassandra ${{ steps.cassandra-version.outputs.value }} (${{ matrix.test-group }}, JDK ${{ matrix.java-version }})
require_tests: true
report_paths: "*/**/target/*-reports/*.xml"
follow_symlink: true
Expand All @@ -295,8 +307,15 @@ jobs:
strategy:
matrix:
scylla-version: [LTS-LATEST, LTS-PRIOR, LATEST]
java-version: [8]
java-version: [11, 17]
test-group: [parallelizable, serial, isolated]
exclude:
- scylla-version: LTS-PRIOR
java-version: 17
- scylla-version: LTS-LATEST
java-version: 17
- scylla-version: LATEST
java-version: 11
fail-fast: false

steps:
Expand Down Expand Up @@ -391,7 +410,7 @@ jobs:
uses: mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3 # v5.6.2
if: always()
with:
check_name: Integration tests report for Scylla ${{ steps.scylla-version.outputs.value }} (${{ matrix.test-group }})
check_name: Integration tests report for Scylla ${{ steps.scylla-version.outputs.value }} (${{ matrix.test-group }}, JDK ${{ matrix.java-version }})
require_tests: true
report_paths: "*/**/target/*-reports/*.xml"
follow_symlink: true
Expand Down
11 changes: 11 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED
8 changes: 4 additions & 4 deletions LICENSE_binary
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ 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,
This product bundles Java Native Runtime - POSIX 3.1.22,
which is available under the Eclipse Public License version 2.0.
see licenses/jnr-posix.txt

Expand All @@ -234,14 +234,14 @@ This product bundles ASM 9.2: a very small and fast Java bytecode manipulation f
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,
This product bundles HdrHistogram 2.2.2: 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,
This product bundles The Simple Logging Facade for Java (SLF4J) API 2.0.18,
which is available under the MIT License.
see licenses/slf4j-api.txt

This product bundles Reactive Streams 1.0.3,
This product bundles Reactive Streams 1.0.4,
which is available under the MIT License.
see licenses/reactive-streams.txt
2 changes: 1 addition & 1 deletion README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To build the documentation of this project, you need a UNIX-based operating syst

You also need the following software installed to generate the reference documentation of the driver:

- Java JDK 8 or higher
- Java JDK 11 or higher
- Maven

Once you have installed the above software, you can build and preview the documentation by following the steps outlined in the `Quickstart guide <https://sphinx-theme.scylladb.com/stable/getting-started/quickstart.html>`_.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ builder](manual/query_builder/), [mapper](manual/mapper)).

The driver is compatible with Scylla and Apache Cassandra® 2.1 and higher.

It requires Java 8 or higher.
It requires Java 11 or higher.

## Migrating from previous versions

Expand Down
3 changes: 3 additions & 0 deletions core-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
Comment thread
dkropachev marked this conversation as resolved.
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ public enum DateRangePrecision {
private final ChronoUnit roundingUnit;
// The formatter is only used for formatting (parsing is done with DateRangeUtil.parseCalendar to
// be exactly the same as DSE's).
// If that ever were to change, note that DateTimeFormatters with a time zone have a parsing bug
// in Java 8: the formatter's zone will always be used, even if the input string specifies one
// explicitly.
// If that ever were to change, note that DateTimeFormatters with a time zone had a parsing bug
// on older JDKs: the formatter's zone would always be used, even if the input string specified
// one explicitly.
// See https://stackoverflow.com/questions/41999421
private final DateTimeFormatter formatter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static final class ObjectGraphNodeGraphSON2Serializer extends StdSerializer<Obje

private static final long serialVersionUID = 1L;

protected ObjectGraphNodeGraphSON2Serializer() {
ObjectGraphNodeGraphSON2Serializer() {
super(ObjectGraphNode.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
import java.nio.ByteBuffer;
import java.time.Duration;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -114,7 +113,7 @@ public static InsightsClient createInsightsClient(
DataCentersFinder dataCentersFinder = new DataCentersFinder();
return new InsightsClient(
driverContext,
() -> new Date().getTime(),
System::currentTimeMillis,
insightsConfiguration,
new PlatformInfoFinder(),
new ReconnectionPolicyInfoFinder(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@
package com.datastax.dse.driver.internal.core.insights;

import com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting;
import com.datastax.oss.driver.shaded.guava.common.base.Joiner;
import java.util.Arrays;
import java.util.regex.Pattern;

class PackageUtil {
static final String DEFAULT_SPECULATIVE_EXECUTION_PACKAGE =
"com.datastax.oss.driver.internal.core.specex";
static final String DEFAULT_LOAD_BALANCING_PACKAGE =
"com.datastax.oss.driver.internal.core.loadbalancing";
static final String DEFAULT_AUTH_PROVIDER_PACKAGE = "com.datastax.oss.driver.internal.core.auth";
private static final Pattern PACKAGE_SPLIT_REGEX = Pattern.compile("\\.");
private static final Joiner DOT_JOINER = Joiner.on(".");

static String getNamespace(Class<?> tClass) {
String namespace = "";
Expand Down Expand Up @@ -61,18 +56,14 @@ private static ClassSettingDetails getClassSettingDetails(

@VisibleForTesting
static String getClassName(String classSetting) {
String[] split = PACKAGE_SPLIT_REGEX.split(classSetting);
if (split.length == 0) {
return "";
}
return split[split.length - 1];
int lastDot = classSetting.lastIndexOf('.');
return lastDot < 0 ? classSetting : classSetting.substring(lastDot + 1);
}

@VisibleForTesting
static String getFullPackageOrDefault(String classSetting, String defaultValue) {
String[] split = PACKAGE_SPLIT_REGEX.split(classSetting);
if (split.length <= 1) return defaultValue;
return DOT_JOINER.join(Arrays.copyOf(split, split.length - 1));
int lastDot = classSetting.lastIndexOf('.');
return lastDot < 0 ? defaultValue : classSetting.substring(0, lastDot);
}

static class ClassSettingDetails {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.datastax.dse.driver.internal.core.insights.schema.InsightsPlatformInfo.CPUS;
import com.datastax.oss.driver.internal.core.os.Native;
import com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting;
import com.datastax.oss.driver.shaded.guava.common.base.Splitter;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -37,11 +38,10 @@
import java.util.Objects;
import java.util.Properties;
import java.util.function.Function;
import java.util.regex.Pattern;

class PlatformInfoFinder {
private static final String MAVEN_IGNORE_LINE = "The following files have been resolved:";
private static final Pattern DEPENDENCY_SPLIT_REGEX = Pattern.compile(":");
private static final Splitter DEPENDENCY_SPLITTER = Splitter.on(':');
static final String UNVERIFIED_RUNTIME_VERSION = "UNVERIFIED";
private final Function<DependencyFromFile, URL> propertiesUrlProvider;

Expand Down Expand Up @@ -197,11 +197,13 @@ private List<DependencyFromFile> extractMavenDependenciesFromFile(InputStream in
}

private DependencyFromFile extractDependencyFromLine(String line) {
String[] split = DEPENDENCY_SPLIT_REGEX.split(line);
if (split.length == 6) { // case for i.e.: com.github.jnr:jffi:jar:native:1.2.16:compile
return new DependencyFromFile(split[0], split[1], split[4], checkIsOptional(split[5]));
List<String> split = DEPENDENCY_SPLITTER.splitToList(line);
if (split.size() == 6) { // case for i.e.: com.github.jnr:jffi:jar:native:1.2.16:compile
return new DependencyFromFile(
split.get(0), split.get(1), split.get(4), checkIsOptional(split.get(5)));
} else { // case for normal: org.ow2.asm:asm:jar:5.0.3:compile
return new DependencyFromFile(split[0], split[1], split[3], checkIsOptional(split[4]));
return new DependencyFromFile(
split.get(0), split.get(1), split.get(3), checkIsOptional(split.get(4)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public boolean equals(Object o) {
}
InsightMetadata that = (InsightMetadata) o;
return Objects.equals(name, that.name)
&& Objects.equals(timestamp, that.timestamp)
&& timestamp == that.timestamp
&& Objects.equals(tags, that.tags)
&& insightType == that.insightType
&& Objects.equals(insightMappingId, that.insightMappingId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public boolean isDeterministic() {
}

@Override
@Nullable
public Optional<Boolean> getDeterministic() {
return Optional.ofNullable(deterministic);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
*
* Examples:
*
* <table summary="examples">
* <table>
* <caption>Examples</caption>
* <tr><th>Create statement</th><th>Case-sensitive?</th><th>CQL id</th><th>Internal id</th></tr>
* <tr><td>CREATE TABLE t(foo int PRIMARY KEY)</td><td>No</td><td>foo</td><td>foo</td></tr>
* <tr><td>CREATE TABLE t(Foo int PRIMARY KEY)</td><td>No</td><td>foo</td><td>foo</td></tr>
Expand Down
Loading
Loading