[fix](glue) support amazonaws.com.cn endpoint (#29128)

This commit is contained in:
Mingyu Chen
2023-12-29 13:50:30 +08:00
committed by GitHub
parent 9fc613de9c
commit f34b46a366
2 changed files with 16 additions and 10 deletions

View File

@ -550,7 +550,11 @@ public class PropertyConverter {
String region = S3Properties.getRegionOfEndpoint(endpoint);
if (!Strings.isNullOrEmpty(region)) {
props.put(S3Properties.REGION, region);
String s3Endpoint = "s3." + region + ".amazonaws.com";
String suffix = ".amazonaws.com";
if (endpoint.endsWith(".amazonaws.com.cn")) {
suffix = ".amazonaws.com.cn";
}
String s3Endpoint = "s3." + region + suffix;
if (isGlueIceberg) {
s3Endpoint = "https://" + s3Endpoint;
}