wsjz commented on code in PR #18005:
URL: https://github.com/apache/doris/pull/18005#discussion_r1154316951
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergGlueExternalCatalog.java:
##########
@@ -31,26 +34,27 @@
public class IcebergGlueExternalCatalog extends IcebergExternalCatalog {
+ // As a default placeholder. The path just use for 'create table', query
stmt will not use it.
+ private static final String CHECKED_WAREHOUSE = "s3://doris";
+
public IcebergGlueExternalCatalog(long catalogId, String name, String
resource, Map<String, String> props) {
super(catalogId, name);
+ props = PropertyConverter.convertToMetaProperties(props);
catalogProperty = new CatalogProperty(resource, props);
}
@Override
protected void initLocalObjectsImpl() {
icebergCatalogType = ICEBERG_GLUE;
GlueCatalog glueCatalog = new GlueCatalog();
- // AWSGlueAsync glueClient;
Configuration conf = setGlueProperties(getConfiguration());
glueCatalog.setConf(conf);
// initialize glue catalog
- Map<String, String> catalogProperties =
catalogProperty.getProperties();
- // check AwsProperties.GLUE_CATALOG_ENDPOINT
- String metastoreUris =
catalogProperty.getOrDefault(CatalogProperties.WAREHOUSE_LOCATION, "");
- if (StringUtils.isEmpty(metastoreUris)) {
- throw new IllegalArgumentException("Missing glue properties
'warehouse'.");
- }
- catalogProperties.put(CatalogProperties.WAREHOUSE_LOCATION,
metastoreUris);
+ Map<String, String> catalogProperties =
catalogProperty.getHadoopProperties();
+ String warehouse =
catalogProperty.getOrDefault(CatalogProperties.WAREHOUSE_LOCATION,
CHECKED_WAREHOUSE);
+ catalogProperties.put(CatalogProperties.WAREHOUSE_LOCATION, warehouse);
+ catalogProperties.put(AwsProperties.S3FILEIO_ENDPOINT,
+ catalogProperties.getOrDefault(Constants.ENDPOINT,
conf.get(S3Properties.Env.ENDPOINT)));
Review Comment:
S3Properties.Env.ENDPOINT is BE endpoint.
set AwsProperties.S3FILEIO_ENDPOINT by converted s3 endpoint or by BE s3
endpoint default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]