[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
This commit is contained in:
slothever
2024-05-17 22:43:59 +08:00
committed by yiguolei
parent a59f9c3fa1
commit 89d5f2e816
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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