[enhancement](paimon)add obs filesystem for paimon (#31061)

This commit is contained in:
wuwenchi
2024-02-19 10:09:41 +08:00
committed by yiguolei
parent 2f960c49f5
commit bda2042c78
3 changed files with 50 additions and 0 deletions

View File

@ -20,6 +20,7 @@ package org.apache.doris.datasource.paimon;
import org.apache.doris.datasource.CatalogProperty;
import org.apache.doris.datasource.property.PropertyConverter;
import org.apache.doris.datasource.property.constants.CosProperties;
import org.apache.doris.datasource.property.constants.ObsProperties;
import org.apache.doris.datasource.property.constants.PaimonProperties;
import org.apache.logging.log4j.LogManager;
@ -68,6 +69,15 @@ public class PaimonFileExternalCatalog extends PaimonExternalCatalog {
properties.get(CosProperties.SECRET_KEY));
options.put(PaimonProperties.WAREHOUSE,
options.get(PaimonProperties.WAREHOUSE).replace("cosn://", "s3://"));
} else if (properties.containsKey(ObsProperties.ENDPOINT)) {
options.put(PaimonProperties.PAIMON_S3_ENDPOINT,
properties.get(ObsProperties.ENDPOINT));
options.put(PaimonProperties.PAIMON_S3_ACCESS_KEY,
properties.get(ObsProperties.ACCESS_KEY));
options.put(PaimonProperties.PAIMON_S3_SECRET_KEY,
properties.get(ObsProperties.SECRET_KEY));
options.put(PaimonProperties.WAREHOUSE,
options.get(PaimonProperties.WAREHOUSE).replace("obs://", "s3://"));
}
if (properties.containsKey(PropertyConverter.USE_PATH_STYLE)) {