danielcweeks commented on code in PR #14447:
URL: https://github.com/apache/iceberg/pull/14447#discussion_r2543655129
##########
bigquery/src/main/java/org/apache/iceberg/gcp/bigquery/BigQueryMetastoreCatalog.java:
##########
@@ -128,16 +150,40 @@ void initialize(
LocationUtil.stripTrailingSlash(properties.get(CatalogProperties.WAREHOUSE_LOCATION));
}
+ Map<String, String> fileIOProperties = prepareFileIOProperties(properties,
initialProjectId);
+
this.fileIO =
CatalogUtil.loadFileIO(
properties.getOrDefault(
CatalogProperties.FILE_IO_IMPL,
"org.apache.iceberg.io.ResolvingFileIO"),
- properties,
+ fileIOProperties,
conf);
this.listAllTables =
Boolean.parseBoolean(properties.getOrDefault(LIST_ALL_TABLES, "true"));
}
+ @VisibleForTesting
+ Map<String, String> prepareFileIOProperties(Map<String, String> properties,
String gcpProjectId) {
Review Comment:
If we want to separate the configuration for the metastore client and the
gcs client, I think it would make more sense to follow the pattern used by
S3FileIO where there we would have separate `GCPProperties` classes and
`GCSProperties` classes that extract the specific properties and provide
separable configuration. Right now, we're switching behavior based on whether
we're using impersonation, but what we really want is to just separate the
configuration.
--
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]