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

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


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 74df91a0236 branch-4.0: [fix](remote) Endpoint contains `http://` will 
result in `UnknownHostException` #58500 (#58667)
74df91a0236 is described below

commit 74df91a0236df82b3ce44cf10dc11aeedcdbdd2e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Dec 3 22:38:25 2025 +0800

    branch-4.0: [fix](remote) Endpoint contains `http://` will result in 
`UnknownHostException` #58500 (#58667)
    
    Cherry-picked from #58500
    
    Co-authored-by: Yixuan Wang <[email protected]>
---
 .../src/main/java/org/apache/doris/cloud/storage/DefaultRemote.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/storage/DefaultRemote.java 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/storage/DefaultRemote.java
index a46dc5041a6..088f9f5a808 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/cloud/storage/DefaultRemote.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/cloud/storage/DefaultRemote.java
@@ -134,7 +134,11 @@ public class DefaultRemote extends RemoteBase {
                 credentials = AwsBasicCredentials.create(obj.getAk(), 
obj.getSk());
             }
             StaticCredentialsProvider scp = 
StaticCredentialsProvider.create(credentials);
-            URI endpointUri = URI.create("http://"; + obj.getEndpoint());
+            String endpointStr = obj.getEndpoint();
+            if (!endpointStr.contains("://")) {
+                endpointStr = "http://"; + endpointStr;
+            }
+            URI endpointUri = URI.create(endpointStr);
             s3Client = 
S3Client.builder().endpointOverride(endpointUri).credentialsProvider(scp)
                     .region(Region.of(obj.getRegion())).build();
         }


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

Reply via email to