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

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

commit 89d5f2e816a75c8f36bf8653e067927eb37d08d8
Author: slothever <18522955+w...@users.noreply.github.com>
AuthorDate: Fri May 17 22:43:59 2024 +0800

    [fix](multi-catalog)remove http scheme in oss endpoint (#34907)
    
    remove http scheme in oss endpoint, scheme maybe appear in url 
(http://bucket.http//.region.aliyuncs.com) if use http client
---
 .../java/org/apache/doris/datasource/property/PropertyConverter.java  | 2 +-
 .../org/apache/doris/datasource/property/PropertyConverterTest.java   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/property/PropertyConverter.java
 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/property/PropertyConverter.java
index bccd3147a9b..e3ba2bdce27 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/property/PropertyConverter.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/property/PropertyConverter.java
@@ -493,7 +493,7 @@ public class PropertyConverter {
     }
 
     private static String getOssEndpoint(String region, boolean publicAccess) {
-        String prefix = "http://oss-";;
+        String prefix = "oss-";
         String suffix = ".aliyuncs.com";
         if (!publicAccess) {
             suffix = "-internal" + suffix;
diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/datasource/property/PropertyConverterTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/datasource/property/PropertyConverterTest.java
index 90a15db4aaa..4e4b0408641 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/datasource/property/PropertyConverterTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/datasource/property/PropertyConverterTest.java
@@ -336,7 +336,7 @@ public class PropertyConverterTest extends 
TestWithFeService {
         Map<String, String> hdProps = 
catalog.getCatalogProperty().getHadoopProperties();
         Assertions.assertEquals("akk", hdProps.get(OssProperties.ACCESS_KEY));
         Assertions.assertEquals("skk", hdProps.get(OssProperties.SECRET_KEY));
-        Assertions.assertEquals("http://oss-cn-beijing-internal.aliyuncs.com";,
+        Assertions.assertEquals("oss-cn-beijing-internal.aliyuncs.com",
                 hdProps.get(OssProperties.ENDPOINT));
 
         String queryDlf2 = "create catalog hms_dlf2 properties (\n"
@@ -392,7 +392,7 @@ public class PropertyConverterTest extends 
TestWithFeService {
         Map<String, String> hdProps3 = 
catalog3.getCatalogProperty().getHadoopProperties();
         Assertions.assertEquals("akk", hdProps3.get(OssProperties.ACCESS_KEY));
         Assertions.assertEquals("skk", hdProps3.get(OssProperties.SECRET_KEY));
-        Assertions.assertEquals("http://oss-cn-beijing-internal.aliyuncs.com";, 
hdProps3.get(OssProperties.ENDPOINT));
+        Assertions.assertEquals("oss-cn-beijing-internal.aliyuncs.com", 
hdProps3.get(OssProperties.ENDPOINT));
     }
 
     @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to