-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 storage classes config support #24934
S3 storage classes config support #24934
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: EdenKik.
|
8da6edb
to
e541e2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can squash all commits
lib/trino-filesystem-s3/src/main/java/io/trino/filesystem/s3/S3FileSystemConfig.java
Outdated
Show resolved
Hide resolved
39c8191
to
5d02c5f
Compare
5d02c5f
to
218a639
Compare
STANDARD_IA, | ||
INTELLIGENT_TIERING; | ||
|
||
public static StorageClass getStorageClass(S3FileSystemConfig.StorageClassType storageClass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toStorageClass()
import StorageClassType
} | ||
|
||
@Config("s3.storage-class") | ||
@ConfigDescription("The S3 storage class to use when writing the data") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S3 storage class used while writing data
@@ -49,6 +50,7 @@ public void testDefaults() | |||
.setExternalId(null) | |||
.setStsEndpoint(null) | |||
.setStsRegion(null) | |||
.setStorageClass(StorageClassType.STANDARD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static import STANDARD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we cannot use it in this case because both RetryMode and StorageClassType have a STANDARD constant. This causes ambiguity in the code, as the compiler cannot distinguish between the two without explicitly mentioning their parent classes.
@@ -124,6 +127,7 @@ public void testExplicitPropertyMappings() | |||
.setExternalId("myid") | |||
.setStsEndpoint("sts.example.com") | |||
.setStsRegion("us-west-2") | |||
.setStorageClass(StorageClassType.STANDARD_IA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static import STANDARD_IA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % couple of comments
@@ -30,6 +30,8 @@ support: | |||
- Required region name for S3. | |||
* - `s3.path-style-access` | |||
- Use path-style access for all requests to S3 | |||
* - `s3.storage-class` | |||
- Set the S3 storage class to use when writing the data, defaults to STANDARD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S3 storage class to use while writing data. Defaults to
STANDARD
.
Add s3.storage-class property integration in S3 operations Modify configuration tests to use storage class property Update Trino documentation to describe s3.storage-class configuration Implement whitelist for supported storage classes and map to SDK options
218a639
to
93e8ec6
Compare
Thanks @EdenKik |
Added to release notes for all four connectors. |
Description
This PR enhances Trino's compatibility with S3 storage classes and adds support for configuring the storage class of objects written to S3. By introducing the s3.storage-class property, users can now specify how objects should be stored, enabling better control over storage costs and retrieval performance.
Closes issue #24698
Release notes