tuantran0910 commented on code in PR #62988:
URL: https://github.com/apache/doris/pull/62988#discussion_r4664966623
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergCatalogFactory.java:
##########
@@ -480,18 +496,27 @@ public static Map<String, String>
buildCatalogProperties(IcebergCatalogPropertie
opts.put(GcpCredential.CREDENTIAL_PROVIDER_TYPE,
credential.getCredentialProviderType().name());
putIfNotBlank(opts,
GcpCredential.IMPERSONATION_SERVICE_ACCOUNT,
credential.getImpersonationServiceAccount());
- // Keep explicit FileIO choices. By default, S3 aliases use
the GCP client factory,
- // while gs/HDFS paths use HadoopFileIO with the native
fs.gs.* configuration
- // (the plugin does not bundle iceberg-gcp's GCSFileIO).
- opts.putIfAbsent(CatalogProperties.FILE_IO_IMPL,
"org.apache.iceberg.io.ResolvingFileIO");
+ // S3 aliases use the GCP client factory; gs/HDFS stay on
HadoopFileIO (pinned above)
+ // with the native fs.gs.* configuration emitted here.
opts.put(S3FileIOProperties.CLIENT_FACTORY,
GcpS3FileIOAwsClientFactory.class.getName());
});
}));
+ if (IcebergCatalogProperties.TYPE_REST.equals(flavor) &&
hasRawGcsHadoopProperties(props)) {
Review Comment:
Thanks for checking. I traced this and it isn't a regression: those
`fs.s3a.*` keys never applied to `gs://` paths.
Before this PR, `HadoopFileIO` picks the filesystem for `gs://` from
`fs.gs.impl`. With only raw `fs.s3a.*` keys, nothing sets it. `guessIsGcs()`
binds no typed GCS storage, and only `GcsFileSystemProperties` maps `gs` to
`S3AFileSystem`. So Hadoop uses the `gs` filesystem registered by the bundled
`gcs-connector`. That is `GoogleHadoopFileSystem`, which authenticates with
Google credentials and never reads `fs.s3a.*`; if it isn't found, the read
fails with "No FileSystem for scheme gs". Before and after this PR, that setup
reads `gs://` with Google credentials.
A catalog that did route `gs://` to S3A has to set `fs.gs.impl`. That is an
`fs.gs.*` key, so the current guard already pins `NativeGcsResolvingFileIO` for
it. Extending the guard to `fs.s3a.*` would also change the FileIO of REST
catalogs that use `fs.s3a.*` only for `s3://` data, so I'd prefer to keep it as
is.
--
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]