Skip to content

feat(java): add an optional S3 storage adapter - #966

Open
keksmd wants to merge 2 commits into
apache:mainfrom
keksmd:codex/java-storage-s3-upstream
Open

feat(java): add an optional S3 storage adapter#966
keksmd wants to merge 2 commits into
apache:mainfrom
keksmd:codex/java-storage-s3-upstream

Conversation

@keksmd

@keksmd keksmd commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Reason for this PR

Implements #965: an optional, dependency-isolated Java S3 storage adapter over the merged storage API.

What changes are included in this PR?

  • Adds graphar-storage-s3, backed by caller-owned AWS SDK v2 S3Client.
  • Validates s3:// locations, uses HeadObject/HTTP Range GET for independent seekable reads, and stages sequential output locally before conditional publication.
  • Adds credential-free S3 contract coverage plus an opt-in test against a real MinIO endpoint for staged create, non-overwrite, overwrite, and direct-buffer range reads.

The production code does not start, configure, or close an S3 client. The MinIO test is intentionally opt-in: normal SDK CI has no Docker or credential requirement.

Are these changes tested?

Yes.

mvn --no-transfer-progress -f maven-projects/pom.xml -pl storage-s3 -am clean verify -Dspotless.check.skip=true
GRAPHAR_MINIO_ENDPOINT=http://localhost:19000 mvn --no-transfer-progress -f maven-projects/pom.xml -pl storage-s3 -am -Dtest=MinioS3StorageIntegrationIT -Dsurefire.failIfNoSpecifiedTests=false test

Both pass locally, along with Spotless, pre-commit, and git diff --check.

Are there any user-facing changes?

Yes. Java users can construct S3Storage with their configured AWS SDK v2 client and access GraphAr s3:// data through the storage API.

Checklist

  • I have self-reviewed this PR
  • I have run make cpplint (if this PR contains C++ changes)
  • I have run pre-commit
  • I have run the relevant tests

S3 range reads and staged writes need to satisfy the storage API without leaking AWS dependencies into metadata or core modules.

Relates to apache#965.

Rejected: a mandatory S3 or Hadoop dependency in the storage API.

Not-tested: a real MinIO endpoint; the follow-up opt-in transport test remains separate.
@keksmd

keksmd commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Hi @SemyonSinchenko — this is the next independent Java slice after #960/#962: an optional S3 adapter over the now-merged storage API. It is intentionally isolated from #961 and has credential-free range/write contract coverage. I would appreciate your review when you have time.

Exercise staged conditional publication and range reads against an actual S3-compatible endpoint, while keeping the test opt-in for normal SDK verification.

Relates to apache#965.
@keksmd

keksmd commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Updated this PR into the complete S3 transport vertical: it now includes the opt-in real-MinIO gate (staged conditional publication and range reads), while normal CI stays credential- and Docker-free.

@SemyonSinchenko
SemyonSinchenko self-requested a review August 24, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant