[fix](backup) missing use_path_style properties for minio (#25803)
Follow #25496. In #25496, I fixed the issue that the aws s3 properties are invalid when passing from FE to BE. But it missed the `use_path_style` property, which is useful for minio access. This PR fix it.
This commit is contained in:
@ -23,6 +23,7 @@ import org.apache.doris.datasource.property.constants.MinioProperties;
|
||||
import org.apache.doris.datasource.property.constants.ObsProperties;
|
||||
import org.apache.doris.datasource.property.constants.OssProperties;
|
||||
import org.apache.doris.datasource.property.constants.S3Properties;
|
||||
import org.apache.doris.datasource.property.constants.S3Properties.Env;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -71,6 +72,18 @@ public class S3ClientBEProperties {
|
||||
if (properties.containsKey(S3Properties.BUCKET)) {
|
||||
beProperties.put(S3Properties.Env.BUCKET, properties.get(S3Properties.BUCKET));
|
||||
}
|
||||
if (properties.containsKey(S3Properties.MAX_CONNECTIONS)) {
|
||||
beProperties.put(Env.MAX_CONNECTIONS, properties.get(S3Properties.MAX_CONNECTIONS));
|
||||
}
|
||||
if (properties.containsKey(S3Properties.REQUEST_TIMEOUT_MS)) {
|
||||
beProperties.put(Env.REQUEST_TIMEOUT_MS, properties.get(S3Properties.REQUEST_TIMEOUT_MS));
|
||||
}
|
||||
if (properties.containsKey(S3Properties.CONNECTION_TIMEOUT_MS)) {
|
||||
beProperties.put(Env.CONNECTION_TIMEOUT_MS, properties.get(S3Properties.CONNECTION_TIMEOUT_MS));
|
||||
}
|
||||
if (properties.containsKey(PropertyConverter.USE_PATH_STYLE)) {
|
||||
beProperties.put(PropertyConverter.USE_PATH_STYLE, properties.get(PropertyConverter.USE_PATH_STYLE));
|
||||
}
|
||||
return beProperties;
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,6 +150,8 @@ public class S3Properties extends BaseProperties {
|
||||
} else if (entry.getKey().startsWith(MinioProperties.MINIO_PREFIX)) {
|
||||
String s3Key = entry.getKey().replace(MinioProperties.MINIO_PREFIX, S3Properties.S3_PREFIX);
|
||||
s3Properties.put(s3Key, entry.getValue());
|
||||
} else {
|
||||
s3Properties.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
return s3Properties;
|
||||
|
||||
Reference in New Issue
Block a user