Skip to content

QATOOLS-2 [DynamoDB] Upgraded to AWS SDK for Java v2#24

Merged
CodeLieutenant merged 1 commit intoscylladb:masterfrom
m-szymon:dynamodb_aws_sdk_v2
Jan 20, 2026
Merged

QATOOLS-2 [DynamoDB] Upgraded to AWS SDK for Java v2#24
CodeLieutenant merged 1 commit intoscylladb:masterfrom
m-szymon:dynamodb_aws_sdk_v2

Conversation

@m-szymon
Copy link

Based on #3 work by Arjan Schaaf schaafas@amazon.nl

I split original commit into 2 parts - this PR only updates SDK.
Due to previous changes in the code it required some adaptations.
Tests (which didn't exists in original commit) were also updated to use new SDK.

It removes option dynamodb.awsCredentialsFile switching to the "Default Credential Provider" chain.

Fixes #10

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the DynamoDB client from AWS SDK for Java v1 to v2, removing the deprecated credentials file configuration in favor of the Default Credential Provider chain.

Key changes:

  • Migration from AWS SDK v1 (1.12.565) to v2 (2.27.21)
  • Removal of dynamodb.awsCredentialsFile property and related credentials file handling
  • Updated all DynamoDB API calls to use v2 builder patterns and method names

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dynamodb/pom.xml Updates SDK dependencies from v1 to v2, including apache-client and dynamodb modules
dynamodb/src/main/java/site/ycsb/db/DynamoDBClient.java Migrates client initialization and all API operations to SDK v2 patterns
dynamodb/src/test/java/site/ycsb/db/dynamodb/DynamoDBClientTest.java Updates test setup and assertions to use SDK v2 API
dynamodb/conf/dynamodb.properties Removes credentials file references and unused connection parameters
dynamodb/conf/AWSCredentials.properties Removes deprecated credentials template file
dynamodb/README.md Updates documentation for new credential provider approach

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@soyacz
Copy link

soyacz commented Nov 20, 2025

@m-szymon it broke some tests testExclusiveScan(site.ycsb.db.dynamodb.DynamoDBClientTest): Scan did not return expected number of rows

@m-szymon
Copy link
Author

@m-szymon it broke some tests testExclusiveScan(site.ycsb.db.dynamodb.DynamoDBClientTest): Scan did not return expected number of rows

Yes, I'm taking care of it. But first I am trying to figure out why the test is not running locally (probably after Fedora upgrade):

256  [main] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy  -Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
        UnixSocketClientProviderStrategy: failed with exception BadRequestException (Status 400: {"message":"client version 1.32 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version"}
)
        DockerDesktopClientProviderStrategy: failed with exception NullPointerException (Cannot invoke "java.nio.file.Path.toString()" because the return value of "org.testcontainers.dockerclient.DockerDesktopClientProviderStrategy.getSocketPath()" is null)As no valid configuration was found, execution cannot continue.
See https://java.testcontainers.org/on_failure.html for more details.

@m-szymon m-szymon force-pushed the dynamodb_aws_sdk_v2 branch 2 times, most recently from 4048b08 to 682d624 Compare November 21, 2025 12:26
@m-szymon m-szymon changed the title [DynamoDB] Upgraded to AWSK SDK for Java v2 [DynamoDB] Upgraded to AWS SDK for Java v2 Nov 21, 2025
Based on work by Arjan Schaaf <schaafas@amazon.nl>

Fixes scylladb#10
@m-szymon m-szymon force-pushed the dynamodb_aws_sdk_v2 branch from 682d624 to 92cad16 Compare November 21, 2025 12:27
@m-szymon
Copy link
Author

it broke some tests

It was a problem with credentials - basically all tests failed. And locally it used my system configuration.
It is fixed, but the credential setting changes in this PR may brake things.
I followed the original PR #3, but now I think that maybe I should keep the backward compatibility with dynamodb.awsCredentialsFile.

@dani-tweig dani-tweig changed the title [DynamoDB] Upgraded to AWS SDK for Java v2 QATOOLS-2 [DynamoDB] Upgraded to AWS SDK for Java v2 Jan 18, 2026
@fruch
Copy link

fruch commented Jan 18, 2026

@soyacz @CodeLieutenant what's blocking this one ?

unit-tests seems to be working now

@soyacz
Copy link

soyacz commented Jan 19, 2026

@CodeLieutenant can you take a look? Merge if LGTY.

@CodeLieutenant CodeLieutenant merged commit 54081dc into scylladb:master Jan 20, 2026
3 checks passed
CodeLieutenant added a commit that referenced this pull request Feb 3, 2026
…namoDB client for ScyllaDB)

Initial implementation for Loadbalancing strategy for Alternator - ScyllaDB compatible API for DynamoDB.

This Code has been based on previous work done by @dkropachev and drivers team (https://github.com/scylladb/alternator-load-balancing/tree/master/java), further improved and adapted for the use in YCSB. Also it is created in a way that can be extract into separated library (if proven reliable) so that others can use it who need loadbalacing support.

- [x] Since this one PR is using Java 21, `checkstyle.xml` has been updated to allow new features from Java 21 not to be counted as errors but allowed.
- [x] Additional properties added needed to customize the load-balancing strategy

Changes from the original Alternator Loadbalancer:

- Use of Java 21 Features and Virtual Threads for managing and checking the ScyllaDB Hosts ( this can be further improved when we switch to Java 23+, as it brings a lot of improvements to the Virtual Thread API)
- Fully Async implementation for both Alternator Client and Loadbalancer
- Removed support for SDK v1 since YCSB migrated from it PR #24

Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DynamoDB (and Alternator) - Announcing end-of-support for AWS SDK for Java v1.x effective December 31, 2025

4 participants