-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
import io.airlift.units.Duration; | ||
import io.trino.filesystem.s3.S3FileSystemConfig.ObjectCannedAcl; | ||
import io.trino.filesystem.s3.S3FileSystemConfig.S3SseType; | ||
import io.trino.filesystem.s3.S3FileSystemConfig.StorageClassType; | ||
import jakarta.validation.constraints.AssertTrue; | ||
import org.junit.jupiter.api.Test; | ||
|
||
|
@@ -31,6 +32,7 @@ | |
import static io.airlift.units.DataSize.Unit.MEGABYTE; | ||
import static io.trino.filesystem.s3.S3FileSystemConfig.RetryMode.LEGACY; | ||
import static io.trino.filesystem.s3.S3FileSystemConfig.RetryMode.STANDARD; | ||
import static io.trino.filesystem.s3.S3FileSystemConfig.StorageClassType.STANDARD_IA; | ||
import static java.util.concurrent.TimeUnit.MINUTES; | ||
|
||
public class TestS3FileSystemConfig | ||
|
@@ -49,6 +51,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 commentThe 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 commentThe 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. |
||
.setCannedAcl(ObjectCannedAcl.NONE) | ||
.setSseType(S3SseType.NONE) | ||
.setRetryMode(LEGACY) | ||
|
@@ -88,6 +91,7 @@ public void testExplicitPropertyMappings() | |
.put("s3.external-id", "myid") | ||
.put("s3.sts.endpoint", "sts.example.com") | ||
.put("s3.sts.region", "us-west-2") | ||
.put("s3.storage-class", "STANDARD_IA") | ||
.put("s3.canned-acl", "BUCKET_OWNER_FULL_CONTROL") | ||
.put("s3.retry-mode", "STANDARD") | ||
.put("s3.max-error-retries", "12") | ||
|
@@ -124,6 +128,7 @@ public void testExplicitPropertyMappings() | |
.setExternalId("myid") | ||
.setStsEndpoint("sts.example.com") | ||
.setStsRegion("us-west-2") | ||
.setStorageClass(STANDARD_IA) | ||
.setCannedAcl(ObjectCannedAcl.BUCKET_OWNER_FULL_CONTROL) | ||
.setStreamingPartSize(DataSize.of(42, MEGABYTE)) | ||
.setRetryMode(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 used while writing data