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

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 95b4a4a1ba [fix](s3 load) fix that `FE` can not access s3 
objected-storage (#15323)
95b4a4a1ba is described below

commit 95b4a4a1ba2f43ab4f41c153fdc5ee59e2637382
Author: Tiewei Fang <[email protected]>
AuthorDate: Fri Dec 23 22:15:32 2022 +0800

    [fix](s3 load) fix that `FE` can not access s3 objected-storage (#15323)
---
 .../src/main/java/org/apache/doris/catalog/S3Resource.java   | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/S3Resource.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/S3Resource.java
index bf40955f78..18fae53ad3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/S3Resource.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/S3Resource.java
@@ -182,10 +182,14 @@ public class S3Resource extends Resource {
         if (properties.containsKey(S3Resource.S3_CONNECTION_TIMEOUT_MS)) {
             s3Properties.put("fs.s3a.connection.timeout", 
properties.get(S3_CONNECTION_TIMEOUT_MS));
         }
-        if (s3Properties.containsKey(S3Resource.S3_ENDPOINT)) {
-            s3Properties.put("fs.s3.impl.disable.cache", "true");
-            s3Properties.put("fs.s3.impl", 
"org.apache.hadoop.fs.s3a.S3AFileSystem");
-            s3Properties.put("fs.s3a.attempts.maximum", "2");
+        s3Properties.put("fs.s3.impl.disable.cache", "true");
+        s3Properties.put("fs.s3.impl", 
"org.apache.hadoop.fs.s3a.S3AFileSystem");
+        s3Properties.put("fs.s3a.attempts.maximum", "2");
+
+        if (Boolean.valueOf(properties.getOrDefault(S3Resource.USE_PATH_STYLE, 
"false")).booleanValue()) {
+            s3Properties.put("fs.s3a.path.style.access", "true");
+        } else {
+            s3Properties.put("fs.s3a.path.style.access", "false");
         }
         for (Map.Entry<String, String> entry : properties.entrySet()) {
             if (entry.getKey().startsWith(S3Resource.S3_FS_PREFIX)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to