You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ca...@apache.org on 2023/08/31 09:53:38 UTC

[dolphinscheduler] branch dev updated: [DS-14830][dolphinscheduler-storage-s3] Allow customization of s3 regions (#14831)

This is an automated email from the ASF dual-hosted git repository.

caishunfeng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 6e5870d711 [DS-14830][dolphinscheduler-storage-s3] Allow customization of s3 regions (#14831)
6e5870d711 is described below

commit 6e5870d71197341a9b2a3655932de2ed24bcfb36
Author: Luke Yan <10...@users.noreply.github.com>
AuthorDate: Thu Aug 31 17:53:30 2023 +0800

    [DS-14830][dolphinscheduler-storage-s3] Allow customization of s3 regions (#14831)
    
    Replace `Regions. fromName (region). getName() ` with the `region ` variable
    
    Co-authored-by: xiangzihao <46...@qq.com>
---
 .../apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dolphinscheduler-storage-plugin/dolphinscheduler-storage-s3/src/main/java/org/apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java b/dolphinscheduler-storage-plugin/dolphinscheduler-storage-s3/src/main/java/org/apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java
index 83d367df41..86d3216aa8 100644
--- a/dolphinscheduler-storage-plugin/dolphinscheduler-storage-s3/src/main/java/org/apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java
+++ b/dolphinscheduler-storage-plugin/dolphinscheduler-storage-s3/src/main/java/org/apache/dolphinscheduler/plugin/storage/s3/S3StorageOperator.java
@@ -59,7 +59,6 @@ import com.amazonaws.AmazonServiceException;
 import com.amazonaws.auth.AWSStaticCredentialsProvider;
 import com.amazonaws.auth.BasicAWSCredentials;
 import com.amazonaws.client.builder.AwsClientBuilder;
-import com.amazonaws.regions.Regions;
 import com.amazonaws.services.s3.AmazonS3;
 import com.amazonaws.services.s3.AmazonS3ClientBuilder;
 import com.amazonaws.services.s3.model.AmazonS3Exception;
@@ -110,7 +109,7 @@ public class S3StorageOperator implements Closeable, StorageOperate {
                     .standard()
                     .withPathStyleAccessEnabled(true)
                     .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(
-                            endPoint, Regions.fromName(region).getName()))
+                            endPoint, region))
                     .withCredentials(
                             new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret)))
                     .build();
@@ -119,7 +118,7 @@ public class S3StorageOperator implements Closeable, StorageOperate {
                     .standard()
                     .withCredentials(
                             new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret)))
-                    .withRegion(Regions.fromName(region))
+                    .withRegion(region)
                     .build();
         }
     }