morningman commented on code in PR #52831:
URL: https://github.com/apache/doris/pull/52831#discussion_r2196710975
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergRestExternalCatalog.java:
##########
@@ -43,51 +41,25 @@ public IcebergRestExternalCatalog(long catalogId, String
name, String resource,
@Override
protected void initCatalog() {
icebergCatalogType = ICEBERG_REST;
+ // 1. Get properties for REST catalog service.
+ IcebergRestProperties icebergRestProperties = (IcebergRestProperties)
catalogProperty.getMetastoreProperties();
+ Map<String, String> options = new
HashMap<>(icebergRestProperties.getIcebergRestCatalogProperties());
- Configuration conf = replaceS3Properties(getConfiguration());
+ // 2. Get properties for FileIO.
+ Configuration conf = new Configuration();
+ for (StorageProperties storageProperties :
catalogProperty.getStoragePropertiesMap().values()) {
+ if (storageProperties instanceof S3Properties) {
Review Comment:
We should strickly check:
1. there should be only s3(or s3 compatible) and hdfs properties
2. should be most at on s3(or s3 compatible) and one hdfs properties
##########
fe/fe-core/src/main/java/org/apache/doris/planner/IcebergTableSink.java:
##########
@@ -129,9 +132,30 @@ public void bindDataSink(Optional<InsertCommandContext>
insertCtx)
tSink.setCompressionType(getTFileCompressType(IcebergUtils.getFileCompress(icebergTable)));
// hadoop config
- HashMap<String, String> props = new
HashMap<>(icebergTable.properties());
- Map<String, String> catalogProps =
targetTable.getCatalog().getProperties();
- props.putAll(catalogProps);
+ IcebergExternalCatalog catalog = (IcebergExternalCatalog)
targetTable.getCatalog();
Review Comment:
This logic is same as in `IcebergScanNode`, should extract one
--
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]