[enhance](ColdHeatSeparation) carry use path style info along with cold heat separation to support using minio (#22249)

This commit is contained in:
AlexYue
2023-07-30 21:03:33 +08:00
committed by GitHub
parent 4077338284
commit 06e4061b94
3 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import org.apache.doris.common.DdlException;
import org.apache.doris.datasource.credentials.CloudCredential;
import org.apache.doris.datasource.credentials.CloudCredentialWithEndpoint;
import org.apache.doris.datasource.credentials.DataLakeAWSCredentialsProvider;
import org.apache.doris.datasource.property.PropertyConverter;
import org.apache.doris.thrift.TS3StorageParam;
import com.amazonaws.auth.EnvironmentVariableCredentialsProvider;
@ -241,6 +242,9 @@ public class S3Properties extends BaseProperties {
if (properties.containsKey(S3Properties.Env.BUCKET)) {
properties.putIfAbsent(S3Properties.BUCKET, properties.get(S3Properties.Env.BUCKET));
}
if (properties.containsKey(PropertyConverter.USE_PATH_STYLE)) {
properties.putIfAbsent(PropertyConverter.USE_PATH_STYLE, properties.get(PropertyConverter.USE_PATH_STYLE));
}
}
public static TS3StorageParam getS3TStorageParam(Map<String, String> properties) {
@ -261,6 +265,8 @@ public class S3Properties extends BaseProperties {
String connTimeoutMs = properties.get(S3Properties.CONNECTION_TIMEOUT_MS);
s3Info.setMaxConn(Integer.parseInt(connTimeoutMs == null
? S3Properties.Env.DEFAULT_CONNECTION_TIMEOUT_MS : connTimeoutMs));
String usePathStyle = properties.getOrDefault(PropertyConverter.USE_PATH_STYLE, "false");
s3Info.setUsePathStyle(Boolean.parseBoolean(usePathStyle));
return s3Info;
}
}