diff --git a/aws/src/main/java/org/apache/iceberg/aws/AwsClientFactories.java b/aws/src/main/java/org/apache/iceberg/aws/AwsClientFactories.java index 9dab7b6df6be..6cf034b4a299 100644 --- a/aws/src/main/java/org/apache/iceberg/aws/AwsClientFactories.java +++ b/aws/src/main/java/org/apache/iceberg/aws/AwsClientFactories.java @@ -40,8 +40,8 @@ import software.amazon.awssdk.services.glue.GlueClientBuilder; import software.amazon.awssdk.services.kms.KmsClient; import software.amazon.awssdk.services.s3.S3AsyncClient; +import software.amazon.awssdk.services.s3.S3BaseClientBuilder; import software.amazon.awssdk.services.s3.S3Client; -import software.amazon.awssdk.services.s3.S3ClientBuilder; import software.amazon.awssdk.services.s3.S3Configuration; public class AwsClientFactories { @@ -204,7 +204,7 @@ public static SdkHttpClient.Builder configureHttpClientBuilder(String httpClient * Configure the endpoint setting for a client * * @deprecated Not for public use. To configure the endpoint for a client, please use {@link - * S3FileIOProperties#applyEndpointConfigurations(S3ClientBuilder)}, {@link + * S3FileIOProperties#applyEndpointConfigurations(S3BaseClientBuilder)}, {@link * AwsProperties#applyGlueEndpointConfigurations(GlueClientBuilder)}, or {@link * AwsProperties#applyDynamoDbEndpointConfigurations(DynamoDbClientBuilder)} accordingly. It * will be removed in 2.0.0 @@ -235,8 +235,8 @@ public static S3Configuration s3Configuration( * Build an AwsBasicCredential object * * @deprecated Not for public use. To configure the credentials for a s3 client, please use {@link - * S3FileIOProperties#applyCredentialConfigurations(AwsClientProperties, S3ClientBuilder)} in - * AwsProperties. It will be removed in 2.0.0. + * S3FileIOProperties#applyCredentialConfigurations(AwsClientProperties, S3BaseClientBuilder)} + * in AwsProperties. It will be removed in 2.0.0. */ @Deprecated static AwsCredentialsProvider credentialsProvider( diff --git a/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java b/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java index 3024ff5bcb3f..6bf582f00bbb 100644 --- a/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java +++ b/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java @@ -49,7 +49,6 @@ import software.amazon.awssdk.core.retry.conditions.RetryCondition; import software.amazon.awssdk.core.retry.conditions.RetryOnExceptionsCondition; import software.amazon.awssdk.core.retry.conditions.TokenBucketRetryCondition; -import software.amazon.awssdk.services.s3.S3AsyncClientBuilder; import software.amazon.awssdk.services.s3.S3BaseClientBuilder; import software.amazon.awssdk.services.s3.S3ClientBuilder; import software.amazon.awssdk.services.s3.S3Configuration; @@ -1022,30 +1021,16 @@ public void applySignerConfiguration(T builder) { } /** - * Override the endpoint for an S3 client. + * Override the endpoint for an S3 sync or async client. * *

Sample usage: * *

    *     S3Client.builder().applyMutation(s3FileIOProperties::applyEndpointConfigurations)
-   * 
- */ - public void applyEndpointConfigurations(T builder) { - if (endpoint != null) { - builder.endpointOverride(URI.create(endpoint)); - } - } - - /** - * Override the endpoint for an S3 async client - * - *

Sample usage: - * - *

    *     S3AsyncClient.builder().applyMutation(s3FileIOProperties::applyEndpointConfigurations)
    * 
*/ - public void applyEndpointConfigurations(T builder) { + public > void applyEndpointConfigurations(T builder) { if (endpoint != null) { builder.endpointOverride(URI.create(endpoint)); }